شكرا يا غالي واخدمك بعرسك
واذا متزوج اخدمك بعرسك من الثانية![]()
شكرا يا غالي واخدمك بعرسك
واذا متزوج اخدمك بعرسك من الثانية![]()
__________________
www.d6b.net
السلام عليكم
1. ما هو تأثير هذه الطريقة على سرعة عرض الصفحات ؟
2. هل تساعد على الكاش بحيث يقل التحميل من الموقع ؟
3. كيف يمكنني تطبيقها على المجلة PHPNuke ؟
شكرا
__________________
إستخدم ملفك الخاص لكتابة توقيعك
html بشكل عام أسرع من تصفح php
و محركات البحث يصعب عليها إدخال مواقع تحتوي على صفحات php
و له فوائد كثيره على سيرفر .....
أما عن طريقة تحويل مجلة النيوك فهذا شرح ---->
أنا الصراحة ما جرب الطريقة لكن لو تجربها أنته و تخبرنا النتائج ... تكون سويت خير .....
http://www.swalif.net/softs/showthre...highlight=html
تحياتي لك أخوي ::: أخوكم ( جرح الإمارات ) ......
__________________
::: شبكة جرح الإمارات ::: قريبا :::
و ماذا عن هذا الرابط:
http://www.site.com/play/game.php?gameid=27
كيف يمكن تحويله الى:
http://www.site.com/play/game/27.html
بصراحه هذه آخر محاوله فارجو ان اجد الطريقه الصحيحه.![]()
و شكرآ لكم.
__________________
**** شكرآ سوالف سوفت ****
المشاركة الأصلية كتبت بواسطة sjeeps
![]()
![]()
__________________
**** شكرآ سوالف سوفت ****
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^game-([0-9]+).html$ game.php?gameid=$1
---------------------
أما في ملف php
تعمل الوصله ::::
game-$gameid.html
$gameid= متغير...
__________________
::: شبكة جرح الإمارات ::: قريبا :::
شكرآ اخى جريح الإماراتالمشاركة الأصلية كتبت بواسطة جرح الإمارات
و لكنى ما فهمت :shy:
ماذا تعنى :
أما في ملف php
تعمل الوصله ::::
game-$gameid.html
$gameid
__________________
**** شكرآ سوالف سوفت ****
يعني وصلة الصفحه ... يالغالي ....
__________________
::: شبكة جرح الإمارات ::: قريبا :::
اخوى جريح الإمارات
استحملنى شويه اخوك معلوماته عن الPhp صفر و الحمد لله :shy:
يوجد لدى ملف game.php و index.php و كذلك header.php
اذا تكرمت ممكن التعديل عليهم و ما عليك امر.
header.php:
index.php:كود PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Games</title>
<link rel="stylesheet" type="text/css" href="screenstyle.css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body>
<div class="container">
<div class="titleblock">
<h1>Games</h1>
<p>The latest, greatest, gaming site.</p>
</div>
<div class="rightcontainer">
<div class="rightbox">
<h2>All Games</h2>
<p>
<form name="form1">
<select name="select" id="select" onChange="MM_jumpMenu('parent',this,0)">
<option>Pick A Game!</option>
<?
$sql2 = "SELECT * FROM games";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<option value="game.php?gameid=<? echo $row2["gameid"]; ?>"><? echo $row2["name"]; ?></option>
<?
}
?>
</select>
</form></p></div>
<div class="rightbox">
<h2>Top Games</h2>
<p><font size="1">
<?
$sql2 = "SELECT * FROM games ORDER BY played DESC LIMIT 0,10";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>">
<? echo $row2["name"]; ?>
</a> (
<? echo $row2["played"]; ?>
plays)<br>
<?
}
?><br />
<br />
<?
$sql2 = "SELECT * FROM games";
$result2 = mysql_query($sql2);
$totalplayed = 0;
while($row2 = mysql_fetch_array($result2)) {
$totalplayed = $totalplayed+$row2["played"];
}
?><? echo $totalplayed; ?> games played!</font></p></div>
<div class="rightbox">
<h2>Newest Games</h2>
<p><font size="1">
<?
$sql2 = "SELECT * FROM games ORDER BY gameid DESC LIMIT 0,10";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>"><? echo $row2["name"]; ?></a><br>
<?
}
?></font></p></div>
</div>
<div class="content">
<h2>YourSite.com <a href="index.php"><font size="1">HOME</font></a></h2>
<p>
كود PHP:
<? include("config.php");
db_connect();
?>
<? include("header.php"); ?>
<?
$sql = "select * from games where gameid = '$gameid'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$played = $row["played"]+1;
$sql2 = "update games set played = '$played' where gameid = '$gameid'";
$result2 = mysql_query($sql2);
?>
<div align="center">
<table width="406" border="0">
<tr>
<td><div align="center">
<table width="406" border="0">
<tr>
<td width="400" height="21" valign="top">
<?
$sql = "SELECT * FROM categories";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
$catname = $row["catname"];
$numgames=mysql_num_rows(mysql_query("select * from games where category='$catname' and visible = '1'"));
$halfnumgames=$numgames/2;
$leftnumgames=round($halfnumgames);
$max_results = $halfnumgames-.5;
$rightnumgames=round($max_results);
$leftend = $leftnumgames;
$rightstart = $leftnumgames+1;
$rightend = $leftnumgames+$rightnumgames;
?>
<div align="left"> <b><? echo $row["catname"]; ?></b> <br>
<table width="100%" border="0">
<tr>
<td>
<?
$sql2 = "SELECT * FROM games WHERE category = '$catname' AND visible = '1' ORDER BY played DESC LIMIT 0,$leftend";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<table width="200" border="0">
<tr>
<td width="51"><img src="images/<? echo $row2["image"]; ?>" height="50" width="50"></td>
<td valign="top" width="149"><font size="1"><? echo $row2["name"]; ?><br>
<? echo $row2["desc"]; ?><br>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>">Play
>></a></font></td>
</tr>
</table>
<?
}
?>
</td>
<td valign="top">
<?
$sql2 = "SELECT * FROM games WHERE category = '$catname' AND visible = '1' ORDER BY played DESC LIMIT $leftend,$rightend";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<table width="200" border="0">
<tr>
<td width="51"><img src="images/<? echo $row2["image"]; ?>" height="50" width="50"></td>
<td valign="top" width="149"><font size="1"><? echo $row2["name"]; ?><br>
<? echo $row2["desc"]; ?><br>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>">Play
>></a></font></td>
</tr>
</table>
<?
}
?>
</td>
</tr>
</table>
<br>
</div>
<?
}
?>
</td>
</tr>
</table>
</div></td>
</tr>
</table>
</div>
<? include("footer.php"); ?>
__________________
**** شكرآ سوالف سوفت ****
game.php:
كود PHP:
<?
include 'config.php';
db_connect ();
include 'header.php';
echo '
';
$sql = '' . 'select * from games where gameid = \'' . $gameid . '\'';
$result = mysql_query ($sql);
$row = mysql_fetch_array ($result);
$played = $row['played'] + 1;
$sql2 = '' . 'update games set played = \'' . $played . '\' where gameid = \'' . $gameid . '\'';
$result2 = mysql_query ($sql2);
echo '
<table width="406" border="0">
<tr>
<td><div align="center">
<table width="406" border="0">
<tr>
<td width="400" height="21"><div align="center">
<table width="100%" border="0">
<tr>
<td>';
echo $row['name'];
echo ' :: ';
echo $row['desc'];
echo '</td>
</tr>
<tr>
<td><div align="center"><br>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="';
echo $defaultwidth;
echo '" height="';
echo $defaultheight;
echo '">
<param name="movie" value="swf/';
echo $row['file'];
echo '" />
<param name="quality" value="high" />
<embed src="swf/';
echo $row['file'];
echo '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="';
echo $defaultwidth;
echo '" height="';
echo $defaultheight;
echo '"></embed>
</object>
<br>
<br>
</div></td>
</tr>
<tr>
<td>Players: ';
echo $row['played'];
echo '<br>
Average Rating:
';
$sql = '' . 'select * from ratings where gameid = \'' . $gameid . '\'';
$result = mysql_query ($sql);
$ratings = 0;
$raters = 0;
$checkratings = mysql_num_rows (mysql_query ('' . 'select * from ratings where gameid=\'' . $gameid . '\''));
if ($checkratings != '0')
{
while ($row = mysql_fetch_array ($result))
{
$ratings = $ratings + $row['rating'];
$raters = $raters + 1;
}
$rating = $ratings / $raters;
$rating = round ($rating);
echo $rating;
}
else
{
echo 'Unrated.';
}
echo ' <br>
<br>
</td>
</tr>
';
$userip = gethostbyname ($REMOTE_ADDR);
$checkip = mysql_num_rows (mysql_query ('' . 'select * from ratings where userip=\'' . $userip . '\' and gameid=\'' . $gameid . '\''));
if ($checkip != '0')
{
echo ' <tr>
<td>Rating recorded.</td>
</tr>
';
}
else
{
echo ' <tr>
<td> <div align="left">Rate this game:</div>
<form name="form1" method="post" action="rate.php">
<table width="100%" border="0">
<tr>
<td width="87%"><table width="100%" border="0">
<tr>
';
echo ' <td><div align="center">
<table width="100%" border="0">
<tr>
<td><div align="center">
<label>
<input type="radio" name="rating" value="1">
';
echo ' </label>
</div></td>
<td><div align="center">
<label>
<input type="radio" name="rating" value="2">
</label>
';
echo ' </div></td>
<td><div align="center">
<label>
<input type="radio" name="rating" value="3">
</label>
</div></td>
';
echo '<td><div align="center">
<label>
<input type="radio" name="rating" value="4">
</label>
</div></td>
<td><div align="center">
';
echo ' <label>
<input type="radio" name="rating" value="5">
</label>
</div></td>
<td><div align="center">
<label>
<inpu';
echo 't type="radio" name="rating" value="6">
</label>
</div></td>
<td><div align="center">
<label>
<input type="radio" name="rating" value="7">
';
echo ' </label>
</div></td>
<td><div align="center">
<label>
<input type="radio" name="rating" value="8">
</label>
';
echo ' </div></td>
<td><div align="center">
<label>
<input type="radio" name="rating" value="9">
</label>
</div></td>
<td';
echo '><div align="center">
<label>
<input type="radio" name="rating" value="10">
</label>
</div></td>
</tr>
<tr>
';
echo ' <td><div align="center">1</div></td>
<td><div align="center">2</div></td>
<td><div align="center">3</div></td>
<td><div align="center">4</div></td>
<td><div align="center">5</div></td>
';
echo ' <td><div align="center">6</div></td>
<td><div align="center">7</div></td>
<td><div align="center">8</div></td>
<td><div align="center">9</div></td>
<td><div align="center">10</div></td>
';
echo ' </tr>
</table>
<table width="100%" border="0">
<tr>
<td><font color="#FF0000">Poor</font></td>
<td><div align="right"><font color="#009900">Excellent</font></div></td>
';
echo ' </tr>
</table>
</div></td>
</tr>
</table></td>
<td width="13%"><input type="submit" name="Submit" value="Rate!"></td>
</tr>
</table>
';
echo ' <input type="hidden" name="gameid" value="';
echo $gameid;
echo '">
</form></td>
</tr>
';
}
echo ' </table>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
';
include 'footer.php';
?>
__________________
**** شكرآ سوالف سوفت ****
يالغالي هذا ملف العرض أنته عطني مالف الي فيه الأقسام .....
__________________
::: شبكة جرح الإمارات ::: قريبا :::
يالغالى لا يوجد ملف العرض، فقط ملفات:المشاركة الأصلية كتبت بواسطة جرح الإمارات
header.php
game.php
index.php
footer.php
rate.php
admin.php
config.php
![]()
__________________
**** شكرآ سوالف سوفت ****
حطلي كود ملف
index.php
header.php
لو ما عليك أمر ...
__________________
::: شبكة جرح الإمارات ::: قريبا :::
header.php
كود PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Games</title>
<link rel="stylesheet" type="text/css" href="screenstyle.css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body>
<div class="container">
<div class="titleblock">
<h1>Games</h1>
<p>The latest, greatest, gaming site.</p>
</div>
<div class="rightcontainer">
<div class="rightbox">
<h2>All Games</h2>
<p>
<form name="form1">
<select name="select" id="select" onChange="MM_jumpMenu('parent',this,0)">
<option>Pick A Game!</option>
<?
$sql2 = "SELECT * FROM games";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<option value="game.php?gameid=<? echo $row2["gameid"]; ?>"><? echo $row2["name"]; ?></option>
<?
}
?>
</select>
</form></p></div>
<div class="rightbox">
<h2>Top Games</h2>
<p><font size="1">
<?
$sql2 = "SELECT * FROM games ORDER BY played DESC LIMIT 0,10";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>">
<? echo $row2["name"]; ?>
</a> (
<? echo $row2["played"]; ?>
plays)<br>
<?
}
?><br />
<br />
<?
$sql2 = "SELECT * FROM games";
$result2 = mysql_query($sql2);
$totalplayed = 0;
while($row2 = mysql_fetch_array($result2)) {
$totalplayed = $totalplayed+$row2["played"];
}
?><? echo $totalplayed; ?> games played!</font></p></div>
<div class="rightbox">
<h2>Newest Games</h2>
<p><font size="1">
<?
$sql2 = "SELECT * FROM games ORDER BY gameid DESC LIMIT 0,10";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>"><? echo $row2["name"]; ?></a><br>
<?
}
?></font></p></div>
</div>
<div class="content">
<h2>YourSite.com <a href="index.php"><font size="1">HOME</font></a></h2>
<p>index.php
كود PHP:
<? include("config.php");
db_connect();
?>
<? include("header.php"); ?>
<?
$sql = "select * from games where gameid = '$gameid'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$played = $row["played"]+1;
$sql2 = "update games set played = '$played' where gameid = '$gameid'";
$result2 = mysql_query($sql2);
?>
<div align="center">
<table width="406" border="0">
<tr>
<td><div align="center">
<table width="406" border="0">
<tr>
<td width="400" height="21" valign="top">
<?
$sql = "SELECT * FROM categories";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
$catname = $row["catname"];
$numgames=mysql_num_rows(mysql_query("select * from games where category='$catname' and visible = '1'"));
$halfnumgames=$numgames/2;
$leftnumgames=round($halfnumgames);
$max_results = $halfnumgames-.5;
$rightnumgames=round($max_results);
$leftend = $leftnumgames;
$rightstart = $leftnumgames+1;
$rightend = $leftnumgames+$rightnumgames;
?>
<div align="left"> <b><? echo $row["catname"]; ?></b> <br>
<table width="100%" border="0">
<tr>
<td>
<?
$sql2 = "SELECT * FROM games WHERE category = '$catname' AND visible = '1' ORDER BY played DESC LIMIT 0,$leftend";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<table width="200" border="0">
<tr>
<td width="51"><img src="images/<? echo $row2["image"]; ?>" height="50" width="50"></td>
<td valign="top" width="149"><font size="1"><? echo $row2["name"]; ?><br>
<? echo $row2["desc"]; ?><br>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>">Play
>></a></font></td>
</tr>
</table>
<?
}
?>
</td>
<td valign="top">
<?
$sql2 = "SELECT * FROM games WHERE category = '$catname' AND visible = '1' ORDER BY played DESC LIMIT $leftend,$rightend";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<table width="200" border="0">
<tr>
<td width="51"><img src="images/<? echo $row2["image"]; ?>" height="50" width="50"></td>
<td valign="top" width="149"><font size="1"><? echo $row2["name"]; ?><br>
<? echo $row2["desc"]; ?><br>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>">Play
>></a></font></td>
</tr>
</table>
<?
}
?>
</td>
</tr>
</table>
<br>
</div>
<?
}
?>
</td>
</tr>
</table>
</div></td>
</tr>
</table>
</div>
<? include("footer.php"); ?>و شكرآ
__________________
**** شكرآ سوالف سوفت ****
حط هذا الكود في ملف index.php
كود:<? include("config.php"); db_connect(); ?> <? include("header.php"); ?> <? $sql = "select * from games where gameid = '$gameid'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $played = $row["played"]+1; $sql2 = "update games set played = '$played' where gameid = '$gameid'"; $result2 = mysql_query($sql2); ?> <div align="center"> <table width="406" border="0"> <tr> <td><div align="center"> <table width="406" border="0"> <tr> <td width="400" height="21" valign="top"> <? $sql = "SELECT * FROM categories"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { $catname = $row["catname"]; $numgames=mysql_num_rows(mysql_query("select * from games where category='$catname' and visible = '1'")); $halfnumgames=$numgames/2; $leftnumgames=round($halfnumgames); $max_results = $halfnumgames-.5; $rightnumgames=round($max_results); $leftend = $leftnumgames; $rightstart = $leftnumgames+1; $rightend = $leftnumgames+$rightnumgames; ?> <div align="left"> <b><? echo $row["catname"]; ?></b> <br> <table width="100%" border="0"> <tr> <td> <? $sql2 = "SELECT * FROM games WHERE category = '$catname' AND visible = '1' ORDER BY played DESC LIMIT 0,$leftend"; $result2 = mysql_query($sql2); while($row2 = mysql_fetch_array($result2)) { ?> <table width="200" border="0"> <tr> <td width="51"><img src="images/<? echo $row2["image"]; ?>" height="50" width="50"></td> <td valign="top" width="149"><font size="1"><? echo $row2["name"]; ?><br> <? echo $row2["desc"]; ?><br> <a href="game-<? echo $row2["gameid"]; ?>.html">Play >></a></font></td> </tr> </table> <? } ?> </td> <td valign="top"> <? $sql2 = "SELECT * FROM games WHERE category = '$catname' AND visible = '1' ORDER BY played DESC LIMIT $leftend,$rightend"; $result2 = mysql_query($sql2); while($row2 = mysql_fetch_array($result2)) { ?> <table width="200" border="0"> <tr> <td width="51"><img src="images/<? echo $row2["image"]; ?>" height="50" width="50"></td> <td valign="top" width="149"><font size="1"><? echo $row2["name"]; ?><br> <? echo $row2["desc"]; ?><br> <a href="game-<? echo $row2["gameid"]; ?>.html">Play >></a></font></td> </tr> </table> <? } ?> </td> </tr> </table> <br> </div> <? } ?> </td> </tr> </table> </div></td> </tr> </table> </div> <? include("footer.php"); ?>
__________________
::: شبكة جرح الإمارات ::: قريبا :::