آخه تو كجا؟phpnukeSOLO گفت:سلام به همه
آقا من ميخوام اون بالاي سايت كه تاريخ روز هست فارسي كنم
چي كار كنم ؟ :roll:
خواهشا يه توضيح كامل يكي بده :?
خب حالا منظورتونو فهميدم.من سعي ميكنم فارسيش كنم.اگه اشتباه نكنم با javascript اگه اينطوريه اينم كدش :SOLO گفت:بله دوست عزيز تو phpnuke (مگه تو بخش nuke پست نزدم؟ :!: )
ولي شايد اين راهنمايي كنه : من دارم دقيقا رو تم Anagram كار ميكنم
ممنون ميشم جوابمو بديد
<script>
function showdate() {
week= new Array("يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنج شنبه","جمعه","شنبه")
months = new Array("فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند");
a = new Date();
d= a.getDay();
day= a.getDate();
month = a.getMonth()+1;
year= a.getYear();
year = (year== 0)?2000:year;
(year<1000)? (year += 2000):true;
year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621;
switch (month) {
case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break;
case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break;
case 3: (day<21)? (month=12, day+=9):(month=1, day-=20); break;
case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break;
case 5:
case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break;
case 7:
case 8:
case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break;
case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break;
case 11:
case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break;
default: break;
}
document.write(" "+week[d]+" "+day+" "+months[month-1]+" "+ year);
}
</script><script>showdate()</script><b></b>
<p></script>
."&nbsp;\n"
."</td>\n"
."<td align=\"right\" width=\"20%\"><font class=\"content\">\n"
."<script type=\"text/javascript\">\n\n"
."<!-- // Array ofmonth Names\n"
."var monthNames = new Array( \""._JANUARY."\",\""._FEBRUARY."\",\""._MARCH."\",
\""._APRIL."\",\""._MAY."\",\""._JUNE."\",\""._JULY."\",\""._AUGUST."\",\"
"._SEPTEMBER."\",\""._OCTOBER."\",
\""._NOVEMBER."\",\""._DECEMBER."\");\n"
."var now = new Date();\n"
."thisYear = now.getYear();\n"
."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
."document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n"
."// -->\n\n"
."</script></b></font></td>\n"
http://medlem.spray.se/samanonline/ بينيد كه كار ميكنه
<?php
global $loonr, $prefix, $dbi, $kokku;
$kokku = sql_num_rows(sql_query("select * from ".$prefix."_stories LIMIT 0, 30 ", $dbi), $dbi);
$bgcolor1 = "#FFCC99";
$bgcolor2 = "#B0C4D3";
$bgcolor3 = "#D2CEC5";
$bgcolor4 = "#FFCC99";
$textcolor1 = "#000000";
$textcolor2 = "#000000";
if ($loonr == "") {
$loonr = "0";
}
function OpenTable() {
global $bgcolor1, $bgcolor2;
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" background=\"box_headline.gif\"><tr><td>\n";
echo "<table width=\"100%\" border=\"3\" cellspacing=\"0\" cellpadding=\"0\"background=\"box_headline.gif\"><tr><td>\n";
}
function CloseTable() {
echo "</td></tr></table></td></tr></table>\n";
}
function OpenTable2() {
global $bgcolor1, $bgcolor2;
echo "<table border=\"0\" cellspacing=\"01\" cellpadding=\"0\" align=\"center\" bgcolor=\"$bgcolor2\"><tr><td>\n";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}
function CloseTable2() {
echo "</td></tr></table></td></tr></table>\n";
}
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
echo "$thetext$notes\n";
} else {
if($informant != "") {
$boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&amp;uname=$informant\">$informant</a> ";
} else {
$boxstuff = "$anonymous ";
}
$boxstuff .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
echo "$boxstuff\n";
}
}
function themeheader() {
global $user, $banners, $samanonline , $sitename, $slogan, $cookie, $prefix;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body text=\"\" link=\"\" vlink=\"\" alink=\"\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" background=\"themes/DesertStorm/images/main-bg.gif\">\n"
."<table cellpadding=\"5\" cellspacing=\"0\" width=\"100%\" border=\"0\"><tr><td align=\"right\">\n";
if ($banners) {
include("banners.php");
}
echo "$samanonline\n";
echo "</td></tr></table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\"><tr>\n"
."<td><IMG src=\"themes/DesertStorm/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td></tr></table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\">\n"
."<tr>\n"
."<td align=\"left\" >\n"
."<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\"WIDTH=100 HEIGHT=100><PARAM NAME=movie VALUE=\"images/samanclock.swf\"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#B0C4D3><PARAM NAME=menu VALUE=false><EMBED src=\"samanclock.swf\" base=\".\" quality=high bgcolor=#B0C4D3 WIDTH=100 HEIGHT=100 TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" menu=\"false\"></EMBED></OBJECT>\n"
."<td align=\"center\" >\n"
."<a href=\"modules.php?op=modload&name=News&file=index\"><img src=\"themes/DesertStorm/images/logo.gif\" align=\"center\" alt=\""._WELCOMETO." $sitename\" HEIGHT=100 border=\"0\"></a></td>\n"
."<td align=\"right\" >\n"
."<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\"WIDTH=100 HEIGHT=100><PARAM NAME=movie VALUE=\"images/samanclock.swf\"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#B0C4D3><PARAM NAME=menu VALUE=false><EMBED src=\"samanclock.swf\" base=\".\" quality=high bgcolor=#B0C4D3 WIDTH=100 HEIGHT=100 TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" menu=\"false\"></EMBED></OBJECT>\n"
."</tr></table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\" background=\"themes/DesertStorm/images/headerline.gif\" height=\"30\">\n"
."<tr valign=\"middle\"><td><IMG src=\"themes/DesertStorm/images/pixel.gif\" width=\"24\" height=\"30\" border=\"0\" hspace=\"0\"></td><td><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"4\" height=\"30\"><width=\"4\" height=\"30\"></td>\n"
."<td nowrap class=\"artsubhead\" align=\"left\">\n";
echo "<script type=\"text/javascript\">\n\n"
. " {\n"
. "week= new Array(\"يكشنبه\",\"دوشنبه\",\"سه شنبه\",\"چهارشنبه\",\"پنج شنبه\",\"جمعه\",\"شنبه\")\n"
. "months = new Array(\"فروردين\",\"ارديبهشت\",\"خرداد\",\"تير\",\"مرداد\",\"شهريور\",\"مهر\",\"آبان\",\"آذر\",\"دي\",\"بهمن\",\"اسفند\");\n"
. "a = new Date();\n"
. "d= a.getDay();\n"
. "day= a.getDate();\n"
. "month = a.getMonth()+1;\n"
. "year= a.getYear();\n"
. "year = (year== 0)?2000:year;\n"
. "(year<1000)? (year += 2000):true;\n"
. "year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621;\n"
. "switch (month) {\n"
. "case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break;\n"
. "case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break;\n"
. "case 3: (day<21)? (month=12, day+=9):(month=1, day-=20); break;\n"
. "case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break;\n"
. "case 5:\n"
. "case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break;\n"
. "case 7:\n"
. "case 8:\n"
. "case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break;\n"
. "case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break;\n"
. "case 11:\n"
. "case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break;\n"
. "default: break;\n"
. "}\n"
. "document.write(\"<b>امروز: \"+ week[d]+\" \"+day+\" \"+months[month-1]+\" \"+ year);\n"
. "}\n"
."</script>\n"
;
echo "<td width=\"4\" height=\"30\"><width=\"4\" height=\"30\"></td></tr></table>\n"
."<td align=\"center\" height=\"10\" width=\"100%\"><B> &nbsp;<strong>::</strong>&nbsp;<A href=\"index.php\">Home</a> &nbsp;<strong>::</strong>&nbsp;<A href=\"modules.php?name=Topics\"> Topics</a> &nbsp;<strong>::</strong>&nbsp;<A href=\"modules.php?name=Downloads\">Downloads</a> &nbsp;<strong>::</strong>&nbsp;<A href=\"modules.php?name=Web_Links\">Web_Links</a> &nbsp;<strong>::</strong>&nbsp;<A href=\"modules.php?name=Your_Account\">Account</a> &nbsp;<strong>::</strong>&nbsp;<A href=\"modules.php?name=Submit_News\">Submit News</a> &nbsp;<strong>::</strong>&nbsp;<A href=\"modules.php?name=Forums\">Forums</a> &nbsp;<strong>::</strong>&nbsp;<A href=\"modules.php?name=Top\">Top</a> &nbsp;<strong>::</strong>&nbsp;</B></td>\n"
."<td align=\"right\">&nbsp;</td>\n"
."</tr>\n"
."</table><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" height=\"15\"><tr>\n"
."<td><IMG src=\"themes/DesertStorm/images/under_hl.gif\" height=\"15\" alt=\"\" border=\"0\" hspace=\"0\"></td></tr></table>\n"
."<!-- FIN DEL TITULO -->\n"
."<table width=\"95%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
."<td width=\"150\" valign=\"top\">\n";
blocks(left);
echo "</td><td><img src=\"themes/DesertStorm/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\">\n";
}
function themeheader1() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body text=\"\" link=\"\" vlink=\"\" alink=\"\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" background=\"themes/DesertStorm/images/main-bg.gif\">\n"
."<table cellpadding=\"5\" cellspacing=\"0\" width=\"100%\" border=\"0\"><tr><td align=\"right\">\n";
if ($banners) {
include("banners.php");
}
echo "</td></tr></table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\"><tr>\n"
."<td><IMG src=\"themes/DesertStorm/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td></tr></table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\">\n"
."<tr>\n"
."<td>\n"
."<a href=\"modules.php?op=modload&name=News&file=index\"><img src=\"themes/DesertStorm/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
."<td align=\"right\" class=\"menuehead\">\n"
."<center><form action=\"modules.php?name=Search\" method=\"post\">"._SEARCH." \n"
."<input type=\"text\" name=\"query\" size=\"14\"></form></center></td>\n"
."<td align=\"center\" class=\"menuehead\">\n"
."</tr></table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\" background=\"themes/DesertStorm/images/headerline.gif\" height=\"30\">\n"
."<tr valign=\"middle\"><td><IMG src=\"themes/DesertStorm/images/pixel.gif\" width=\"24\" height=\"30\" border=\"0\" hspace=\"0\"></td><td><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"4\" height=\"30\"><width=\"4\" height=\"30\"></td>\n"
."<td nowrap class=\"artsubhead\" align=\"left\">\n";
echo "<td width=\"4\" height=\"30\"><width=\"4\" height=\"30\"></td></tr></table>\n"
."<td align=\"left\" height=\"10\" width=\"90%\"><IMG src=\"themes/DesertStorm/images/pixel_top.gif\" width=\"68\" height=\"30\" border=\"0\" hspace=\"0\"><A href=\"index.php\"><IMG src=\"themes/DesertStorm/images/home.gif\" width=\"68\" height=\"30\" alt=\"Home\" border=\"0\" hspace=\"5\"></a><A href=\"modules.php?name=Topics\"><IMG src=\"themes/DesertStorm/images/themes.gif\" width=\"68\" height=\"30\" alt=\"Topics\" border=\"0\" hspace=\"5\"></a><A href=\"modules.php?name=Downloads\"><IMG src=\"themes/DesertStorm/images/downloads.gif\" width=\"68\" height=\"30\" alt=\"Downloads\" border=\"0\" hspace=\"5\"></a><A href=\"modules.php?name=Web_Links\"><IMG src=\"themes/DesertStorm/images/links.gif\" width=\"68\" height=\"30\" alt=\"Links\" border=\"0\" hspace=\"5\"><A href=\"modules.php?name=Your_Account\"><IMG src=\"themes/DesertStorm/images/account.gif\" width=\"68\" height=\"30\" alt=\"Your Account\" border=\"0\" hspace=\"5\"></a><A href=\"modules.php?name=Submit_News\"><IMG src=\"themes/DesertStorm/images/submitnews.gif\" width=\"68\" height=\"30\" alt=\"Submit News\" border=\"0\" hspace=\"5\"></a><A href=\"modules.php?name=Forums\"><IMG src=\"themes/DesertStorm/images/contact.gif\" width=\"68\" height=\"30\" alt=\"Forums\" border=\"0\" hspace=\"5\"></a><A href=\"modules.php?name=Top\"><IMG src=\"themes/DesertStorm/images/topten.gif\" width=\"68\" height=\"30\" alt=\"Top 10\" border=\"0\" hspace=\"5\"></a></td>\n"
."<td align=\"right\" width=\"10%\">&nbsp;</td>\n"
."</tr>\n"
."</table><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" height=\"15\"><tr>\n"
."<td><IMG src=\"themes/DesertStorm/images/under_hl.gif\" height=\"15\" alt=\"\" border=\"0\" hspace=\"0\"></td></tr></table>\n"
."<!-- FIN DEL TITULO -->\n"
."<table width=\"95%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
."<td width=\"150\" valign=\"top\">\n";
// blocks(left);
echo "</td><td><img src=\"themes/DesertStorm/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\">\n";
}
function themefooter() {
global $index;
if ($index == 1) {
echo "</td><td><img src=\"themes/DesertStorm/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td valign=\"top\" width=\"150\">\n";
blocks(right);
}
echo "</td>\n"
."</td></tr></table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\" background=\"themes/DesertStorm/images/headerline.gif\" height=\"30\">\n"
."<tr valign=\"middle\"><td><IMG src=\"themes/DesertStorm/images/pixel.gif\" width=\"24\" height=\"30\" border=\"0\" hspace=\"0\"></td><td><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"4\" height=\"30\"><width=\"4\" height=\"30\"></td>\n"
."<td><IMG src=\"themes/DesertStorm/images/under_hl.gif\" height=\"15\" alt=\"\" border=\"0\" hspace=\"0\"></td></tr></table>\n"
."</tr></table>\n"
."<table width=\"55%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr align=\"center\">\n"
."<td width=\"50%\" colspan=\"1\" class=\"artsubhead\">\n";
footmsg();
echo "</td>\n"
."</tr></table>\n";
}
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath, $cookie, $loonr, $vasak, $parem, $kokku, $storyhome, $storynum, $bgcolor2, $bgcolor3;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
$loonr = ($loonr+1);
if (isset($cookie[3])) {
$storynum = $cookie[3];
} else {
$storynum = $storyhome;
}
$ridaaa1 = round($loonr/2);
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$posted = ""._POSTEDBY." ";
$posted .= get_author($aid);
$posted .= " "._ON." $time $timezone ($counter "._READS.")";
if (($ridaaa1*2) != $loonr) {
$tmpl_file = "themes/DesertStorm/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
$vasak .= "$r_file";
} else {
$tmpl_file = "themes/DesertStorm/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
$parem .= "$r_file";
}
if ($loonr == $storynum OR $loonr == $kokku) {
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
echo "<tr>";
echo "<td valign=\"top\">";
print $vasak;
echo "</td>";
echo "<td width=\"5%\" cellpadding=\"0\" cellspacing=\"0\" valign=\"top\"></td>";
echo "<td valign=\"top\">";
print $parem;
echo "</td>";
echo "</tr>";
echo "</table>";
}
}
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath;
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><a href=\"modules.php?name=News&new_topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"1\" vspace=\"3\"></a><font class=\"arthead\">$title</font><br>\n"
."<font class=\"artsubhead\">"._POSTEDON." $datetime "._BY." ";
formatAidHeader($aid);
if (is_admin($admin)) {
echo "<br>[ <a href=\"admin.php?op=EditStory&amp;sid=$sid\">"._EDIT."</a> | <a href=\"admin.php?op=RemoveStory&amp;sid=$sid\">"._DELETE."</a> ]\n";
}
echo "</td></tr></table><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" background=\"themes/DesertStorm/images/line_bg.gif\"><tr><td width=\"4\" height=\"7\"><img src=\"themes/DesertStorm/images/corner_line_left.gif\" width=\"4\" height=\"7\"></td><td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><img src=\"themes/DesertStorm/images/line_bg.gif\" height=\"7\"></td></tr></table></td><td width=\"4\" height=\"7\" align=\"right\"><img src=\"themes/DesertStorm/images/corner_line_right.gif\" width=\"4\" height=\"7\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n";
echo "<tr><td class=\"art\"><br>\n";
FormatStory($thetext, $notes="", $aid, $informant);
echo "</td></tr></table><br>\n";
}
function themesidebox($title, $content) {
echo "<img src=\"themes/DesertStorm/images/box_head.gif\" width=\"180\" height=\"19\" alt=\"\" border=\"0\"><br><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"themes/DesertStorm/images/box_headline.gif\" width=\"180\" height=\"21\"><tr><td align=center class=\"menuehead\">\n"
."$title\n"
."</td></tr></table>\n"
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"180\" bgcolor=\"B0C4D3\">\n"
."<tr valign=\"top\"><td width=\"20\" background=\"themes/DesertStorm/images/box_bg_l.gif\"><img src=\"themes/DesertStorm/images/pixel.gif\" width=\"21\" height=\"10\"></td><td class=\"artsubhead\"><img src=\"themes/DesertStorm/images/pixel.gif\" width=\"115\" height=\"1\"><br>\n"
."$content\n"
."</td><td width=\"15\" background=\"themes/DesertStorm/images/box_bg_r.gif\"><img src=\"themes/DesertStorm/images/pixel.gif\" width=\"17\" height=\"10\"></td></tr></table><img src=\"themes/DesertStorm/images/box_foot.gif\" width=\"180\" height=\"32\" alt=\"\" border=\"0\"><br>\n";
}
?>
من بهتون برنامه كامل داد ه ام درضمن توضيخ دهيد روي كدام theme كارميكني اسم theme را ميخواهمSOLO گفت:نمي دونم چرا هر كاريش ميكنم يه جاييش لنگ ميزنه :گريه: :گريه:
آقا ساده است ميتوني اون تاريخ ميلادي را ورداري و بعوضش همون تاريخ فارسي زا بنويسيSOLO گفت:سامان جان ممنون
ميدونم اوني كه دادي كامل بود ولي من دارم روي Anagram كار ميكنم
اوني هم كه دادي كار كرد ولي چون بايد كل تم خودم رو باهاش سازگار ميكردم خيلي مشكل ميشد
همونطور كه گفتم من الان دارم روي تم Anagram كار ميكنم و بالاش يه تاريخ ميلادي داره
ميخوام اونو فارسي كنم
ممنون ميشم راهنمايي كنين
آقا شاهرخ حان من اينو نوشتم و به دوستمون هم ارسال شد و نتيحه مثبت بود تمامي كد را اينحا مينويسم هر كسي نياز داشت بتونه استفاده كنهshahrokh_xp گفت:الآن كه ديدم Anagram را به همان روش آقا سامان بايد فارسي كرد.حالا من دقيق نميدونم مشكل شما چيه؟
<?php
$bgcolor1 = "#DAD8D8";
$bgcolor2 = "#EEEEEE";
$bgcolor3 = "#efefef";
$bgcolor4 = "#ffffff";
$textcolor1 = "#000000";
$textcolor2 = "#000000";
function OpenTable() {
global $bgcolor1, $bgcolor2;
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\"><tr><td>\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}
function CloseTable() {
echo "</td></tr></table></td></tr></table>\n";
}
function OpenTable2() {
global $bgcolor1, $bgcolor2;
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}
function CloseTable2() {
echo "</td></tr></table></td></tr></table>\n";
}
/************************************************************/
/* FormatStory */
/* */
/* Here we'll format the look of the stories in our site. */
/* If you dig a little on the function you will notice that */
/* we set different stuff for anonymous, admin and users */
/* when displaying the story. */
/************************************************************/
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
echo "<font class=\"content\">$thetext$notes</font>\n";
} else {
if($informant != "") {
$boxstuff = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
} else {
$boxstuff = "$anonymous ";
}
$boxstuff .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
echo "<font class=\"content\">$boxstuff</font>\n";
}
}
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix, $anonymous;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = $anonymous;
}
echo "<body bgcolor=\"#ffffff\" text=\"#000000\">\n";
if ($banners) {
include("banners.php");
}
echo "<br>\n"
."<table cellpadding=\"0\" cellspacing=\"10\" width=\"780\" border=\"0\" align=\"center\" bgcolor=\"#EEEEEE\">\n"
."<tr>\n"
."<td bgcolor=\"#EEEEEE\">\n"
."<a href=\"index.php\"><img src=\"themes/Anagram/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
."<td bgcolor=\"#EEEEEE\" align=\"right\">\n"
."<form action=\"modules.php?name=Search\" method=\"post\"><font class=\"content\" color=\"#000000\"><b>"._SEARCH." </b>\n"
."<input type=\"text\" name=\"query\" size=\"14\"></font></form></td>\n"
."<td bgcolor=\"#EEEEEE\" align=\"right\">\n"
."<form action=\"modules.php?name=Search\" method=\"get\"><font class=\"content\"><b>"._TOPICS." </b>\n";
$toplist = mysql_query("select topicid, topictext from $prefix"._topics." order by topictext");
echo "<select name=\"topic\"onChange='submit()'>\n"
."<option value=\"\">"._ALLTOPICS."</option>\n";
while(list($topicid, $topics) = mysql_fetch_row($toplist)) {
if ($topicid==$topic) { $sel = "selected "; }
echo "<option $sel value=\"$topicid\">$topics</option>\n";
$sel = "";
}
echo "</select></font></form></td>\n"
."</tr></table>\n"
."<table cellpadding=\"1\" cellspacing=\"2\" width=\"780\" border=\"0\" align=\"center\" bgcolor=\"#DAD8D8\">\n"
."<tr>\n"
."<td width=\"14%\" bgcolor=\"#EEEEEE\" align=\"center\" style=\"cursor:hand\" onMouseOver=\"this.style.background='#DAD8D8'\" onMouseOut=\"this.style.background='#EEEEEE'\" onClick=\"window.location.href='/'\"><a href=\"/\">Home</a></td>\n"
."<td width=\"14%\" bgcolor=\"#EEEEEE\" align=\"center\" style=\"cursor:hand\" onMouseOver=\"this.style.background='#DAD8D8'\" onMouseOut=\"this.style.background='#EEEEEE'\" onClick=\"window.location.href='modules.php?name=Your_Account'\"><a href=\"modules.php?name=Your_Account\">Your Account</a></td>\n"
."<td width=\"14%\" bgcolor=\"#EEEEEE\" align=\"center\" style=\"cursor:hand\" onMouseOver=\"this.style.background='#DAD8D8'\" onMouseOut=\"this.style.background='#EEEEEE'\" onClick=\"window.location.href='modules.php?name=FAQ'\"><a href=\"modules.php?name=FAQ\">FAQ</a></td>\n"
."<td width=\"14%\" bgcolor=\"#EEEEEE\" align=\"center\" style=\"cursor:hand\" onMouseOver=\"this.style.background='#DAD8D8'\" onMouseOut=\"this.style.background='#EEEEEE'\" onClick=\"window.location.href='modules.php?name=Topics'\"><a href=\"modules.php?name=Topics\">Topics</a></td>\n"
."<td width=\"14%\" bgcolor=\"#EEEEEE\" align=\"center\" style=\"cursor:hand\" onMouseOver=\"this.style.background='#DAD8D8'\" onMouseOut=\"this.style.background='#EEEEEE'\" onClick=\"window.location.href='modules.php?name=Content'\"><a href=\"modules.php?name=Contenido\">Content</a></td>\n"
."<td width=\"14%\" bgcolor=\"#EEEEEE\" align=\"center\" style=\"cursor:hand\" onMouseOver=\"this.style.background='#DAD8D8'\" onMouseOut=\"this.style.background='#EEEEEE'\" onClick=\"window.location.href='modules.php?name=Submit_News'\"><a href=\"modules.php?name=Submit_News\">Submit News</a></td>\n"
."<td width=\"14%\" bgcolor=\"#EEEEEE\" align=\"center\" style=\"cursor:hand\" onMouseOver=\"this.style.background='#DAD8D8'\" onMouseOut=\"this.style.background='#EEEEEE'\" onClick=\"window.location.href='modules.php?name=Top'\"><a href=\"modules.php?name=Top\">Top 10</a></td>\n"
."</tr>\n"
."</table>\n"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"780\" border=\"0\" align=\"center\" bgcolor=\"#fefefe\">\n"
."<tr>\n"
."<td bgcolor=\"#DAD8D8\" colspan=\"4\"><IMG src=\"themes/Anagram/images/pixel.gif\" width=\"1\" height=1 alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
."</tr>\n"
."<tr valign=\"middle\" bgcolor=\"#DAD8D8\">\n"
."<td width=\"20%\" nowrap><font class=\"content\">\n";
if ($username == "Anonymous") {
echo "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account\">"._LOGINCREATE."</a>\n";
} else {
echo "&nbsp;&nbsp;"._HELLO." $username!";
}
echo "</font></td>\n"
."<td align=\"center\" height=\"20\" width=\"60%\">\n"
."&nbsp;\n"
."</td>\n"
."<td align=\"right\" width=\"20%\"><font class=\"content\">\n"
. "<script type=\"text/javascript\">\n\n"
. " {\n"
. "week= new Array(\"يكشنبه\",\"دوشنبه\",\"سه شنبه\",\"چهارشنبه\",\"پنج شنبه\",\"جمعه\",\"شنبه\")\n"
. "months = new Array(\"فروردين\",\"ارديبهشت\",\"خرداد\",\"تير\",\"مرداد\",\"شهريور\",\"مهر\",\"آبان\",\"آذر\",\"دي\",\"بهمن\",\"اسفند\");\n"
. "a = new Date();\n"
. "d= a.getDay();\n"
. "day= a.getDate();\n"
. "month = a.getMonth()+1;\n"
. "year= a.getYear();\n"
. "year = (year== 0)?2000:year;\n"
. "(year<1000)? (year += 2000):true;\n"
. "year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621;\n"
. "switch (month) {\n"
. "case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break;\n"
. "case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break;\n"
. "case 3: (day<21)? (month=12, day+=9):(month=1, day-=20); break;\n"
. "case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break;\n"
. "case 5:\n"
. "case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break;\n"
. "case 7:\n"
. "case 8:\n"
. "case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break;\n"
. "case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break;\n"
. "case 11:\n"
. "case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break;\n"
. "default: break;\n"
. "}\n"
. "document.write(\"<b>امروز: \"+ week[d]+\" \"+day+\" \"+months[month-1]+\" \"+ year);\n"
. "}\n"
."</script></b></font></td>\n"
."<td>&nbsp;</td>\n"
."</tr>\n"
."<tr>\n"
."<td bgcolor=\"#DAD8D8\" colspan=\"4\"><IMG src=\"themes/ Anagram/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
."</tr>\n"
."</table>\n"
;
$public_msg = public_message();
echo "$public_msg<br>";
echo "<!-- Begin Main Content -->\n"
."<table width=\"780\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"dir=\"rtl\"><tr valign=\"top\">\n"
."<td background=\"themes/Anagram/images/column-bg.gif\" width=\"150\" valign=\"top\">\n";
blocks(left);
echo "</td>\n"
."<td><img src=\"themes/Anagram/images/pixel.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."<td><img src=\"themes/Anagram/images/pixel.gif\" width=\"5\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."<td width=\"100%\">\n";
}
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $index;
if ($index == 1) {
echo "</td><td><img src=\"themes/Anagram/images/pixel.gif\" width=\"5\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."<td background=\"themes/Anagram/images/column-bg.gif\" valign=\"top\" width=\"150\">\n";
blocks(right);
}
echo "</td>\n"
."</tr></table>\n"
."<table width=\"780\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\">\n"
."<tr align=\"center\">\n"
."<td width=\"100%\" bgcolor=\"#DAD8D8\"><img src=\"themes/Anagram/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\"></td>\n"
."</tr>\n"
."</table>\n"
."<table width=\"780\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#EEEEEE\" align=\"center\">\n"
."<tr align=\"center\">\n"
."<td width=\"100%\" colspan=\"3\">\n";
footmsg();
echo "</td>\n"
."</tr>\n"
."</table>\n";
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" width=\"100%\"><tr><td>\n"
."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#DAD8D8\" width=\"100%\"><tr><td>\n"
."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#EEEEEE\" width=\"100%\"><tr><td align=\"left\">\n"
."<font class=\"option\" color=\"#363636\"><b>$title</b></font>\n"
."</td></tr></table></td></tr></table>\n"
."<b><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$t_image\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a></B>\n";
FormatStory($thetext, $notes, $aid, $informant);
echo "</td></tr></table>\n"
."<table background=\"themes/Anagram/images/column-bg.gif\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\"><tr><td>\n"
."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"center\">\n"
."<font class=\"tiny\">"._POSTEDBY." ";
formatAidHeader($aid);
echo " "._ON." $time $timezone ($counter "._READS.")<br></font>\n"
."<font class=\"content\">$morelink</font>\n"
."</td></tr></table></td></tr></table>\n"
."<br>\n\n\n";
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" width=\"100%\"><tr><td>\n"
."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#DAD8D8\" width=\"100%\"><tr><td>\n"
."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#EEEEEE\" width=\"100%\"><tr><td align=\"left\">\n"
."<font class=\"option\" color=\"#363636\"><b>$title</b></font><br>\n"
."<font class=\"content\">"._POSTEDON." $datetime "._BY." ";
formatAidHeader($aid);
if (is_admin($admin)) {
echo "<br>[ <a href=\"admin.php?op=EditStory&amp;sid=$sid\">"._EDIT."</a> | <a href=\"admin.php?op=RemoveStory&amp;sid=$sid\">"._DELETE."</a> ]\n";
}
echo "</td></tr></table></td></tr></table><br>";
echo "<a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$t_image\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a>\n";
FormatStory($thetext, $notes="", $aid, $informant);
echo "</td></tr></table><br>\n\n\n";
}
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
function themesidebox($title, $content) {
echo "<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"150\">\n"
."<tr>\n"
."<td>\n"
."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#EEEEEE\" width=\"100%\">\n"
."<tr>\n"
."<td align=left><font class=\"content\" color=\"#363636\"><b>$title</b></font></td>\n"
."</tr>\n"
."</table>\n"
."</td>\n"
."</tr>\n"
."</table>\n"
."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"150\">\n"
."<tr valign=\"top\"><td>\n"
."$content\n"
."</td></tr></table>\n"
."<br>\n\n\n";
}
?>