يالغالى والله العظيم انا استفدت كثيرا من قسم لغات البرمجه php وانت فعلا افضل من شرح هذه اللغه
يرجى التدقيق فى التشفير على الاقل لا تضيع حقوقك وتعبك وتجعل آخرين يضعون حقوقهم على المجله او السكربت
كود PHP:
<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/
session_start( );
ob_start( );
include( "includes/config.inc.php" );
$Sql = mysql_query( "select * from setting " );
$Row = @mysql_fetch_array( $Sql );
if ( $Row[gzhandler] == on )
{
ob_start( "ob_gzhandler" );
}
$cmd = $_GET['cmd'];
$cmd = preg_replace( "/'\\/<>\"/", "", $cmd );
$cmd = strip_tags( $cmd );
$do = $_GET['do'];
$do = preg_replace( "/'\\/<>\"/", "", $do );
$do = strip_tags( $do );
$idt = intval( $_GET['id'] );
$idt = preg_replace( "/'\\/<>\"/", "", $idt );
$idt = strip_tags( $idt );
$ids = intval( $_GET['id'] );
$ids = preg_replace( "/'\\/<>\"/", "", $ids );
$ids = strip_tags( $ids );
$id = intval( $_GET['id'] );
$id = preg_replace( "/'\\/<>\"/", "", $id );
$id = strip_tags( $id );
$Sql = mysql_query( "select * from setting " );
$Row = @mysql_fetch_array( $Sql );
extract( $Row );
include( "includes/lang.php" );
include( "includes/functions.php" );
echo "\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html dir=\"rtl\" xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"> \r\n<head>\t\r\n";
$styles = $_GET[styles];
$styles = preg_replace( "/'\\/<>\"/", "", $styles );
$styles = strip_tags( $styles );
if ( $do == "mystyles" )
{
set******( "MSHAER", $styles );
$styles = $_******['MSHAER'];
echo "<s";
echo "cript type=\"text/javascript\">\r\n\ttop.location.href = 'index.php'\r\n\t</script>";
}
if ( !isset( $_******['MSHAER'] ) )
{
$style = $mainstyle;
}
else
{
$style = $_******['MSHAER'];
}
if ( $contemp == sql )
{
include( "includes/funtemp.php" );
}
else
{
include( "includes/funtemphtml.php" );
}
echo "\r\n\t<!-- MSHAER.ORG -->\r\n\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $ContentType;
echo "\" />\r\n<meta http-equiv=\"Content-Language\" content=\"";
echo $ContentLanguage;
echo "\" />\r\n\r\n<meta name=\"keywords\" content=\"";
echo $keywords;
echo "\"/>\r\n<meta name=\"description\" content=\"";
echo $description;
echo "\"/>\r\n<title>";
$sitenamed = $sitename;
$ids = intval( $_GET['id'] );
if ( $cmd == "cat" )
{
$Sqlxd = mysql_query( "select * from cat WHERE id='{$ids}' " );
$Rowxd = @mysql_fetch_array( $Sqlxd );
$sitenamed .= "-» {$Rowxd['catname']}";
$sitenamedcat .= "-» {$Rowxd['catname']}";
$sitenamedcatsp .= "-» {$Rowxd['spider']}";
}
if ( $cmd == "post" )
{
$Sqlxdz = mysql_query( "select * from post WHERE id='{$ids}' " );
$Rowxdz = @mysql_fetch_array( $Sqlxdz );
$idspost = "{$Rowxdz['catid']}";
$sitenamedurl .= "-» {$Rowxdz['url']}";
$sitenamedtitles .= " -» {$Rowxdz['title']}";
$sitenamedspider .= " -» {$Rowxdz['spider']}";
$Sqlxdsxx = mysql_query( "select * from cat WHERE id='{$idspost}' " );
$Rowxdsxx = @mysql_fetch_array( $Sqlxdsxx );
$sitenamed .= "-» {$Rowxdsxx['catname']}";
$sitenamed .= " -» {$Rowxdz['title']}";
$sitenamedname .= "-» {$Rowxdsxx['catname']}";
}
if ( $cmd == "index" )
{
$ids = intval( $_GET['id'] );
$result12 = $DB->query( "SELECT * FROM `index` WHERE id='{$ids}' \r\n\r\n\r\n" );
while ( $row2 = $DB->result2array( $result12 ) )
{
extract( $row2 );
$sitenamed .= "-» {$indextitle}";
}
}
if ( $cmd == "polls" )
{
$sitenamed .= "-» الأستفتـــــــــاء";
}
if ( $cmd == "showpolls" )
{
$sitenamed .= "-» نتائج الأستفتاء";
}
$sitenamed .= "Powered by MSHAER ";
echo $sitenamed;
echo "</title>\r\n\r\n";
$id = safe( $id );
$perpage = "{$showpages}";
echo "<s";
echo "tyle type=\"text/css\">\r\n";
my_css( $style );
echo "BODY {\r\n\r\nmargin: ";
echo $topmargin;
echo "px ";
echo $leftmargin;
echo "px ";
echo $rightmargin;
echo "px ";
echo $bottommargin;
echo "px ";
echo $marginwidth;
echo "px ";
echo $marginheight;
echo "px;\r\n}\r\n</style>\r\n";
echo "<s";
echo "cript type=\"text/javascript\" >\r\n";
my_javas( $style );
echo "</script>\r\n\r\n</head>\r\n\r\n<body>\r\n";
if ( $cmd == "cat" )
{
echo "<div style=\"display:none;\">\r\n <h1>\r\n";
echo $sitenamedcat;
echo "</h1>\r\n <h2>\r\n";
echo $sitename;
echo "</h2> \r\n\r\n </div>\r\n";
}
if ( $cmd == "post" )
{
echo "<div style=\"display:none;\">\r\n <h1>\r\n";
echo $sitenamedtitles;
echo "\r\n</h1>\r\n <h2>\r\n";
echo $sitenamedname;
echo "</h2> \r\n <h3>\r\n";
echo $sitenamedspider;
echo "</h3> <h4>\r\n";
echo $sitename;
echo "</h4>\r\n<h5>\r\n";
echo $sitenamedurl;
echo "</h5>\r\n </div>\r\n";
}
my_header( $style );
if ( $states == off )
{
echo "\r\n\r\n{$statesmsg}\r\n";
my_footer( $style );
exit( );
}
else
{
if ( $hokst == on )
{
include( "includes/blocks.php" );
}
echo "\r\n\t<table border=\"0\" width=\"";
echo $mwidth;
echo "\">\r\n\t<tr>\r\n\t\t<td valign=\"top\" width=\"";
echo $Bmwidth;
echo "\">";
include( "right.php" );
echo "\t\t</td>\r\n<td valign=\"top\" >\r\n";
$result1LDup = $DB->query( "SELECT * FROM `block` WHERE he='xup' ORDER BY `shows` " );
while ( $rowup = $DB->result2array( $result1LDup ) )
{
$nameblock = "{$rowup['nameblock']}";
$templx = my_banar_senter_me( $nameblock, $rowup[text], $rowup[idtempblock], $style );
}
echo $templxpup;
if ( empty( $cmd ) )
{
$result1LDupa = $DB->query( "SELECT * FROM `block` WHERE he='top' ORDER BY `shows` " );
while ( $rowupa = $DB->result2array( $result1LDupa ) )
{
$nameblocka = "{$rowupa['nameblock']}";
$templxa = my_banar_senter_me( $nameblocka, $rowupa[text], $rowupa[idtempblock], $style );
}
if ( $showcatindex == "on" )
{
$result12 = $DB->query( "SELECT * FROM `cat` WHERE idsup='0' AND view=1 order by rtb " );
$catse = "<table {$tableindex} ><tr> ";
while ( $row2 = $DB->result2array( $result12 ) )
{
++$Lr;
extract( $row2 );
$idss = $row2[id];
$result12f = $DB->query( "SELECT * FROM `cat` WHERE idsup='{$idss}' " );
$row2f = $DB->result2array( $result12f );
$idsssup = $row2f[id];
if ( $rssstate == on )
{
$rssstatecat = "<a href=\"rss-{$id}.xml \"><img alt=\"rss\" border=\"0\" src=\"rss.gif\" align=\"left\" /></a>";
}
else
{
$rssstatecat = " ";
}
if ( $html == on )
{
$urlcat = "show-cat-".$id.".html";
}
else
{
$urlcat = "index.php?cmd=cat&id={$id}";
}
if ( $picshatstates == on )
{
$picshat = "<img {$imgcat} src=\"{$pic}\" alt=\"{$spider}\" align=\"left\" /></a>";
}
else
{
$picshat = "</a>";
}
$resultsxdt = mysql_query( "SELECT *\r\nFROM `post`\r\n where catid='{$idss}' OR catid='{$idsssup}' " );
$rowxmwdt = mysql_num_rows( $resultsxdt );
$catse .= "<td>\r\n\r\n\r\n\r\n\r\n<table width=\"100%\" \r\n border=\"0 \" ><tbody>\r\n <tr valign=\"top\">\r\n <td width=\"50%\">\r\n <table \r\n\r\n\r\ncellspacing=\"0\" cellpadding=\"0\"\r\n\r\nwidth=\"100%\" \r\nborder=\"0 \">\r\n <tbody>\r\n <tr class=\"title1\">\r\n <td ><img height=\"11\" hspace=\"2 \"\r\n src=\"start.gif\" width=\"10\" \r\n align=\"right\" alt=\" \" /><a href=\"{$urlcat}\" title=\"{$spider}\">\r\n{$catname}</a>\r\nالمواضيع [{$rowxmwdt}]\r\n</td>\r\n <td align=\"left\" >{$rssstatecat}\r\n \r\n \r\n </td></tr></tbody></table> \r\n<a href=\"{$urlcat}\" title=\"{$spider}\">{$picshat}\r\n \r\n \r\n";
$resultsxd = mysql_query( "SELECT *\r\nFROM `post`\r\n where catid='{$idss}' OR catid='{$idsssup}' order by id desc limit {$melimilts}" );
while ( $rowxmw = mysql_fetch_array( $resultsxd ) )
{
$rowxmwd = mysql_num_rows( $resultsxd );
$idpostsd = $rowxmw[id];
if ( $html == on )
{
$urlcatxx = "show-post-".$idpostsd.".html";
}
else
{
$urlcatxx = "index.php?cmd=post&id={$idpostsd}";
}
$message = $rowxmw[title];
$metitlesx = substr( $message, 0, $cuttitles );
$catse .= " \r\n<div class=\"cats\">\r\n <a href=\"{$urlcatxx} \" title=\"{$message}\">-» {$metitlesx} ...</a><br/></div>";
}
$catse .= " </td></tr>\r\n </tbody></table>\r\n\r\n </td>";
if ( $Lr == $showcats )
{
$catse .= "</tr><tr>";
$Lr = 0;
}
}
$catse .= " </tr></table> ";
$textm = $catse;
$titlem = "الأقسام الرئيـسيـه";
$idtemp = $tempscatx;
$hy = my_banar_blocks( $titlem, $textm, $idtemp, $style );
echo $hy;
}
if ( $shopostindex == "on" )
{
$resultsxdp = mysql_query( "SELECT *\r\nFROM `post` order by id desc limit {$melimilts}" );
while ( $rowxmwp = mysql_fetch_array( $resultsxdp ) )
{
++$ry;
$idpostsdp = $rowxmwp[id];
if ( $html == on )
{
$urlcatxxp = "show-post-".$idpostsdp.".html";
}
else
{
$urlcatxxp = "index.php?cmd=post&id={$idpostsdp}";
}
$cuttitlesx = 500;
$messages = $rowxmwp[url];
$messages2 = substr( $messages, 0, $cuttitlesx );
if ( $rowxmwp[pic] )
{
$pich = "\r\n<img border=\"0\" src=\"{$rowxmwp['pic']}\" width=\"60\" height=\"60\" hspace=\"3\" vspace=\"3\" align=\"right\">";
}
else
{
$pich = "\r\n<img border=\"0\" src=\"mshaer.gif\" width=\"60\" height=\"60\" hspace=\"3\" vspace=\"3\" align=\"right\">";
}
$catsepo = "{$pich}\t{$messages2}";
$textmd = "{$catsepo}"."<div align=\"left\"><a href=\"{$urlcatxxp}\" > ....المزيد </a></div>";
$titlemd = " -» {$rowxmwp['title']}";
$idtempd = $tempscatx;
$hys = my_banar_blocks( $titlemd, $textmd, $idtempd, $style );
echo $hys;
}
}
}
if ( $cmd == "polls" )
{
function ratingcard( $nnn )
{
$bick .= "<img border=\"0\" height=\"10\" align=\"middle\" src=\"images/leftvotes.gif\" alt=\" \" />";
$nnn = $nnn + 3;
$bick .= "<img width=\"{$nnn}\" border=\"0 \"align=\"middle\" height=\"10\" src=\"images/mainvotes.gif\" alt=\" \" />";
$bick .= "<img border=\"0\" align=\"middle\" src=\"images/rightvotes.gif\" height=\"10\" alt=\" \" />";
return $bick;
}
$vote = preg_replace( "/'\\/<>\"/", "", $_POST['vote'] );
$vote = strip_tags( $vote );
$culm = $vote;
$id = $idt;
if ( $_******["mshaerpolls".$id] == $id )
{
$updatespolls = "<font color=\"#FF0000\">لم يتم احتساب التصويت ..لقد قمت بالتصويت مسبقا</font>";
}
else if ( $id && $vote && $culm )
{
$query = $DB->query( "update polls SET {$culm}={$culm}+1 WHERE idpolls='{$id}' " );
$scounter = $DB->query( "UPDATE polls SET counters=counters+1 WHERE idpolls='{$id}'" );
$updatespolls = "<br/>تم التصويت بنجاح";
set******( "mshaerpolls".$id, $id, time( ) + 172800 );
}
else
{
$updatespolls .= "لم تقم باختيار اي خيار من خيارات الاستفتاء";
}
$pollsx = $DB->query( "SELECT * FROM polls WHERE idpolls='{$id}'" );
$row = $DB->result2array( $pollsx );
$counters = $row[counters];
$a = $row[a];
$ca = $row[ca];
$b = $row[b];
$cb = $row[cb];
$c = $row[c];
$cc = $row[cc];
$d = $row[d];
$cd = $row[cd];
$e = $row[e];
$ce = $row[ce];
$f = $row[f];
$cf = $row[cf];
$g = $row[g];
$cg = $row[cg];
$h = $row[h];
$ch = $row[ch];
$i = $row[i];
$ci = $row[ci];
$j = $row[j];
$cj = $row[cj];
$k = $row[k];
$ck = $row[ck];
$pollhtml .= "<center>{$row['titles']}</center><br/>";
$pollhtml .= "<center>{$updatespolls}</center>";
$pollhtml .= "<center><table dir=\"rtl\" cellpadding=\"5\" border=\"0\" width=\"90%\">\n";
$pollhtml .= "<tr><td width=\"97\">مجموع الاصوات</td>\n";
$pollhtml .= "<td >{$counters}</td></tr></table>\n";
$pollhtml .= "<table dir=\"rtl\" cellpadding=\"5\" border=\"0\" width=\"90%\">\n";
if ( $a )
{
if ( 0 < $counters )
{
$AA = $ca / $counters * 100;
}
$abick = ratingcard( $AA );
$AA = ceil( $AA );
$pollhtml .= "<tr><td >{$a}</td><td >{$abick} {$AA}% ({$ca})</td></tr>\n";
}
if ( $b )
{
if ( 0 < $counters )
{
$BB = $cb / $counters * 100;
}
$bbick = ratingcard( $BB );
$BB = ceil( $BB );
$pollhtml .= "<tr><td >{$b}</td><td >{$bbick} {$BB}% ({$cb})</td></tr>\n";
}
if ( $c )
{
if ( 0 < $counters )
{
$CC = $cc / $counters * 100;
}
$cbick = ratingcard( $CC );
$CC = ceil( $CC );
$pollhtml .= "<tr><td >{$c}</td><td >{$cbick} {$CC}% ({$cc})</td></tr>\n";
}
if ( $d )
{
if ( 0 < $counters )
{
$DD = $cd / $counters * 100;
}
$dbick = ratingcard( $DD );
$DD = ceil( $DD );
$pollhtml .= "<tr><td >{$d}</td><td >{$dbick} {$DD}% ({$cd})</td></tr>\n";
}
if ( $e )
{
if ( 0 < $counters )
{
$EE = $ce / $counters * 100;
}
$ebick = ratingcard( $EE );
$EE = ceil( $EE );
$pollhtml .= "<tr><td >{$e}</td><td >{$ebick} {$EE}% ({$ce})</td></tr>\n";
}
if ( $f )
{
if ( 0 < $counters )
{
$FF = $cf / $counters * 100;
}
$fbick = ratingcard( $FF );
$FF = ceil( $FF );
$pollhtml .= "<tr><td >{$f}</td><td >{$fbick} {$FF}% ({$cf})</td></tr>\n";
}
if ( $g )
{
if ( 0 < $counters )
{
$GG = $cg / $counters * 100;
}
$gbick = ratingcard( $GG );
$GG = ceil( $GG );
$pollhtml .= "<tr><td >{$g}</td><td >{$gbick} {$GG}% ({$cg})</td></tr>\n";
}
if ( $h )
{
if ( 0 < $counters )
{
$HH = $ch / $counters * 100;
}
$hbick = ratingcard( $HH );
$HH = ceil( $HH );
$pollhtml .= "<tr><td >{$h}</td><td >{$hbick} {$HH}% ({$ch})</td></tr>\n";
}
if ( $i )
{
if ( 0 < $counters )
{
$HH = $ci / $counters * 100;
}
$hbick = ratingcard( $HH );
$HH = ceil( $HH );
$pollhtml .= "<tr><td >{$h}</td><td >{$hbick} {$HH}% ({$ch})</td></tr>\n";
}
if ( $j )
{
if ( 0 < $counters )
{
$JJ = $cj / $counters * 100;
}
$jbick = ratingcard( $JJ );
$JJ = ceil( $JJ );
$pollhtml .= "<tr><td >{$j}</td><td >{$jbick} {$JJ}% ({$cj})</td></tr>\n";
}
if ( $k )
{
if ( 0 < $counters )
{
$KK = $ck / $counters * 100;
}
$kbick = ratingcard( $KK );
$KK = ceil( $KK );
$pollhtml .= "<tr><td >{$k}</td><td >{$kbick} {$KK}% ({$ck})</td></tr>\n";
}
$pollhtml .= "</table></center>\n";
$nameblocks = "نتائج التصويت";
$idpollstemps = $row[idpollstemps];
$templx = my_banar_senter_me( $nameblocks, $pollhtml, "{$tempscatx}", $style );
}
if ( $cmd == "showpolls" )
{
function ratingcard( $nnn )
{
$bick .= "<img border=\"0\" height=\"10\" align=\"middle\" src=\"images/leftvotes.gif\" alt=\" \" />";
$nnn = $nnn + 3;
$bick .= "<img width=\"{$nnn}\" border=\"0 \"align=\"middle\" height=\"10\" src=\"images/mainvotes.gif\" alt=\" \" />";
$bick .= "<img border=\"0\" align=\"middle\" src=\"images/rightvotes.gif\" height=\"10\" alt=\" \" />";
return $bick;
}
$vote = preg_replace( "/'\\/<>\"/", "", $_POST['vote'] );
$vote = strip_tags( $vote );
$culm = $vote;
$pollsx = $DB->query( "SELECT * FROM polls WHERE idpolls='{$idt}'" );
$row = $DB->result2array( $pollsx );
$counters = $row[counters];
$a = $row[a];
$ca = $row[ca];
$b = $row[b];
$cb = $row[cb];
$c = $row[c];
$cc = $row[cc];
$d = $row[d];
$cd = $row[cd];
$e = $row[e];
$ce = $row[ce];
$f = $row[f];
$cf = $row[cf];
$g = $row[g];
$cg = $row[cg];
$h = $row[h];
$ch = $row[ch];
$i = $row[i];
$ci = $row[ci];
$j = $row[j];
$cj = $row[cj];
$k = $row[k];
$ck = $row[ck];
$pollhtml .= "<center>{$row['titles']}</center><br/>";
$pollhtml .= "<center>{$updatespolls}</center>";
$pollhtml .= "<center><table dir=\"rtl\" cellpadding=\"5\" border=\"0\" width=\"90%\">\n";
$pollhtml .= "<tr><td width=\"97\">مجموع الاصوات</td>\n";
$pollhtml .= "<td >{$counters}</td></tr></table>\n";
$pollhtml .= "<table dir=\"rtl\" cellpadding=\"5\" border=\"0\" width=\"90%\">\n"