نمايش چند صفحه در يك صفحه؟؟؟
ببينيد من مي خواهم توي يه صفحه چند صفحه داشته باشم.البته عنوان يه كم بد انتخاب شد :43: نمي دونم منظورم رو فهميديد يا نه.
مثل صفحات install بعضي اسكريپت ها كه در يه صفحه اولش يه فرم براي معرفيه بعد فرمه ميره يه فرم براي ديتابيس و .. مياد.
اين رو نگاه كنيد.
[PHP]<?
/************************************************** *************************
Jupiter Content System @ Jupiterportal.com
Copyright (C) 2005 Cosmin Flavius (highstrike@gmail.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
More Info About The Licence At
کد:
http://www.gnu.org/copyleft/gpl.html
************************************************** **************************/
//-----------------------------------------------------------------
// Extract info secure & fast and fix notice
//-----------------------------------------------------------------
if ($HTTP_SESSION_VARS) {extract($HTTP_SESSION_VARS, EXTR_SKIP); }
if ($_SESSION) {extract($_SESSION, EXTR_SKIP); }
if ($HTTP_COOKIE_VARS) {extract($HTTP_COOKIE_VARS, EXTR_SKIP); }
if ($_COOKIE) {extract($_COOKIE, EXTR_SKIP); }
if ($HTTP_POST_VARS) {extract($HTTP_POST_VARS, EXTR_SKIP); }
if ($_POST) {extract($_POST, EXTR_SKIP); }
if ($HTTP_GET_VARS) {extract($HTTP_GET_VARS, EXTR_SKIP); }
if ($_GET) {extract($_GET, EXTR_SKIP); }
if ($HTTP_ENV_VARS) {extract($HTTP_ENV_VARS, EXTR_SKIP); }
if ($_ENV) {extract($_ENV, EXTR_SKIP); }
if(!isset($a)) $a = NULL;
$url = "{$HTTP_SERVER_VARS['SERVER_NAME']}".str_replace(" ", "_+_-_+_", $HTTP_SERVER_VARS['PHP_SELF']);
$version = "1.1.5";
//-----------------------------------------------------------------
// Do the find_ip function
//-----------------------------------------------------------------
function find_ip()
{
if (getenv('HTTP_CLIENT_IP')) $ip = getenv('HTTP_CLIENT_IP');
elseif (getenv('HTTP_X_FORWARDED_FOR')) $ip = getenv('HTTP_X_FORWARDED_FOR');
elseif (getenv('HTTP_X_FORWARDED')) $ip = getenv('HTTP_X_FORWARDED');
elseif (getenv('HTTP_FORWARDED_FOR')) $ip = getenv('HTTP_FORWARDED_FOR');
elseif (getenv('HTTP_FORWARDED')) $ip = getenv('HTTP_FORWARDED');
else $ip = $_SERVER['REMOTE_ADDR'];
return $ip;
}
//-----------------------------------------------------------------
// Show instalation header
//-----------------------------------------------------------------
?>
<html>
<head>
<title>سیستم مدیریت محتوای ژوپیتر فارسی - ژوپر</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="templates/extended/extra/util.js"></script>
<link href="templates/extended/extra/jupiter.css" rel="stylesheet" type="text/css">
</head>
<body>
<br><br><br><br><center>
<form method="post" action="<?= $PHP_SELF ?>">
<table class="main" style="width: 60%; margin: auto" cellspacing="1" cellpadding="4">
<tr class="head">
<td colspan="3" class="head">سیستم نصب کننده ی مدیریت محتوای ژوپیتر فارسی - ژوپر:</td>
</tr>
<?
//-----------------------------------------------------------------
// Check the script path
//-----------------------------------------------------------------
$my_path = dirname(__FILE__);
$my_path = str_replace("\\", "/", $my_path);
$my_path = '';
//-----------------------------------------------------------------
// Chmod Check
//-----------------------------------------------------------------
if($a == "chmod_check")
{
?>
<tr class="bottom">
<td width="50%"> فایل / پوشه
<td width="30%" >سطح دسترسی
<td width="20%" >وضعیت
</tr>
<?
//-----------------------------------------------------------------
// Important files array
//-----------------------------------------------------------------
$important_files = array('images/avatars','images/emoticons','images/articles','includes/config.php','includes/shout_messages.txt','downloads','install.php');
//-----------------------------------------------------------------
// Checks, checks and overchecks
//-----------------------------------------------------------------
$chmod_errors = 0;
$not_found_errors = 0;
foreach($important_files as $file)
{
$file_name = $my_path . $file;
if(!file_exists($file_name))
{
$file_status = "<font color=red>پیدا نشد، اگر آپلود نشده کنترل کنید !</font>";
$not_found_errors ++;
}
elseif(is_writable($file_name)) $file_status = "<font color=green>قابل نوشتن</font>";
else
{
@chmod("$file_name", 0777);
if(is_writable($file_name)) $file_status = "<font color=green>قابل نوشتن</font>";
else
{
@chmod("$file_name", 0755);
if(is_writable($file_name)) $file_status = "<font color=green>قابل نوشتن</font>";
else
{
$file_status = "<font color=red>غیرقابل نوشتن</font>";
$chmod_errors ++;
}
}
}
$chmod_value = @decoct(@fileperms($my_path . $file)) % 1000;
?>
<tr>
<td class="con1"><?= $file_name ?></td>
<td class="con1"><?= $chmod_value ?></td>
<td class="con1"><?= $file_status ?></td>
</tr>
<?
}
//-----------------------------------------------------------------
// If no errors are found continue instalation
//-----------------------------------------------------------------
if($chmod_errors == 0 && $not_found_errors == 0)
{
$status_report = 'عمل کنترل با موفقیت و بدون هیچ خطایی انجام شد، حالا شما می توانید ادامه ی مراحل نصب را انجام دهید';
$status = '<span class = "ok">موفق</span>';
$next = '
<tr>
<td colspan="3" class="con1" align="left">
<input type=hidden name=a value=doconfig>
<input type=submit style="width:100" class="box" value="بعدی">
</td>
</tr>';
}
//-----------------------------------------------------------------
// If errors are found halt the instalation
//-----------------------------------------------------------------
else
{
if($chmod_errors > 0) { $status_report = "<font color=red><b>اخطار !!!</b></font><br>درهنگام کنترل سطوح دسترسی، <b>$chmod_errors</b> فایل قابل نوشتن نبودند، شما حالا باید <a href='http://www.jupiterportal.com/index.php?n=modules/forum&a=3&d=11&o=17&q=1136' target='_blank'>سطح دسترسی </a> آن ها را به 777 تغییر دهید.<br><br>نصب متوقف شد!<br>"; }
if($not_found_errors > 0) { $status_report .= "<font color=red>اخظار !!!</font> در هنگام کنترل سطوح دسترسی، <b>$not_found_errors</b> فایل موجود نبودند، مطمئن شوید که آن ها را در پوشه ی درستی آپلود کرده اید.<br><br>نصب متوقف شد!<br>"; }
$status = '<span class = "alert">خطا</span>';
$next = NULL;
}
//-----------------------------------------------------------------
// Show the status report
//-----------------------------------------------------------------
?>
<tr class="bottom">
<td colspan="3">گزارش وضعیت: <?= $status ?></td>
</tr>
<tr>
<td colspan="3" class="con1"><?= $status_report ?></td>
</tr>
<?= $next ?>
<?
}
//-----------------------------------------------------------------
// Do Config
//-----------------------------------------------------------------
elseif($a == "doconfig")
{
?>
<tr class="bottom"><td colspan="2">اطلاعات MySQL</td></tr>
<tr>
<td width="42%" class="con1">نام پایگاه داده:</td>
<td width="58%" class="con1"><input type=text style="width:170" maxlength="25" class="box" value="Juper" name="dbname"></td>
</tr>
<tr>
<td class="con1">نام کاربری پایگاه داده:</td>
<td class="con1"><input type=text style="width:170" maxlength="25" class="box" value="root" name="dbuser"></td>
</tr>
<tr>
<td class="con1">رمز عبور پایگاه داده:</td>
<td class="con1"><input type=text style="width:170" maxlength="25" class="box" name="dbpassword"></td>
</tr>
<tr>
<td class="con1">سرور پایگاه داده:</td>
<td class="con1"><input type=text style="width:170" maxlength="25" class="box" value="localhost" name="dbhost"></td>
</tr>
<tr class="bottom"><td colspan="2">اطلاعات شما</td></tr>
<tr>
<td class="con1">نام وب سایت:</td>
<td class="con1"><input type=text style="width:170" maxlength="50" class="box" value="سایت ساخته شده با ژوپر" name="regwebsitename"></td>
</tr>
<tr>
<td class="con1">نام کاربری:</td>
<td class="con1"><input type=text style="width:170" maxlength="25" class="box" name="regusername"></td>
</tr>
<tr>
<td class="con1">رمزعبور:</td>
<td class="con1"><input type=password style="width:170" maxlength="25" class="box" name="regpassword"></td>
</tr>
<tr>
<td class="con1">رمزعبور را مجددا تایپ کنید:</td>
<td class="con1"><input type=password style="width:170" maxlength="25" class="box" name="regpassword2"></td>
</tr>
<tr>
<td class="con1">آدرس ایمیل:</td>
<td class="con1"><input type=text style="width:170" maxlength="25" class="box" name="regemail"></td>
</tr>
<tr>
<td colspan="2" class="con1" align="left"><input type="submit" style="width:100" class="box" value="پایان"></td>
</tr>
<input type="hidden" name="a" value="doinstall">
<?
}
//-----------------------------------------------------------------
// Do Install
//-----------------------------------------------------------------
elseif($a == "doinstall")
{
//-----------------------------------------------------------------
// Start Checks
//-----------------------------------------------------------------
if(!$dbname) { echo '<tr><td class="con1">لطفا نام پایگاه داده ی خود را وارد کنید..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if(!$dbuser) { echo '<tr><td class="con1">لطفا نام کاربری پایگاه داده ی خود را وارد کنید..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if(!$dbhost) { echo '<tr><td class="con1">لطفا سرور پایگاه داده ی خود را وارد کنید..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if(!$regwebsitename) { echo '<tr><td class="con1">لطفا نام وب سایت خود را بنویسید..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if(!$regusername) { echo '<tr><td class="con1">لطفا نام کاربری دلخواه خود را بنویسید..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if(!$regpassword) { echo '<tr><td class="con1">لطفا رمزعبور دلخواه خود را بنویسید..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if($regpassword != $regpassword2) { echo '<tr><td class="con1">متاسفانه رمزهای عبور وارد شده یکی نیستند..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if(!$regemail) { echo '<tr><td class="con1">لطفا آدرس ایمیل خود را بنویسید..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if(!eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$', $regemail)) { echo '<tr><td class="con1">آدرس ایمیل غیرمعتبر است!</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
//-----------------------------------------------------------------
// Do connect and create DB
//-----------------------------------------------------------------
$connection = @mysql_connect($dbhost, $dbuser, $dbpassword);
if(!$connection) { echo '<tr><td class="con1">نمی تواند به پایگاه داده متصل شود..</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
if(!mysql_select_db($dbname, $connection))
{
echo "<tr class='bottom'><td>راه اندازی پایگاه داده</td></tr><tr><td class='con1'>پایگاه داده با نام $dbname وجود ندارد<br>در حال ساخت پایگاه داده جدید می باشد...<br><br>";
if(!mysql_query("CREATE DATABASE `$dbname`")) { echo 'پایگاه داده جدید ساخته نشد.</td></tr><tr><td class="con1"><input type=button style="width:80" class="box" value="بازگشت" onClick="javascript:history.back();"></td></tr></form></table></center></body></html>'; exit; }
else
{
echo "موفق شد! پایگاه داده جدید ساخته شد<br></td></tr>";
mysql_select_db($dbname, $connection);
}
}
//-----------------------------------------------------------------
// Write config stuff in file
//-----------------------------------------------------------------
$config = <<<HTML
<?
\$database_name = "$dbname";
\$database_username = "$dbuser";
\$database_password = "$dbpassword";
\$database_server = "$dbhost";
?>
HTML;
$con_file = fopen("includes/config.php", "w");
fwrite($con_file, $config);
fclose($con_file);
//-----------------------------------------------------------------
// Drop current tables for fresh install
//-----------------------------------------------------------------
mysql_query ("DROP TABLE IF EXISTS `ads`");
mysql_query ("DROP TABLE IF EXISTS `ads_cfg`");
mysql_query ("DROP TABLE IF EXISTS `articles`");
mysql_query ("DROP TABLE IF EXISTS `badwords`");
mysql_query ("DROP TABLE IF EXISTS `bans`");
mysql_query ("DROP TABLE IF EXISTS `blocks`");
mysql_query ("DROP TABLE IF EXISTS `config`");
mysql_query ("DROP TABLE IF EXISTS `downloads`");
mysql_query ("DROP TABLE IF EXISTS `emoticons`");
mysql_query ("DROP TABLE IF EXISTS `events`");
mysql_query ("DROP TABLE IF EXISTS `forum_cat`");
mysql_query ("DROP TABLE IF EXISTS `forum_ranks`");
mysql_query ("DROP TABLE IF EXISTS `forum_replies`");
mysql_query ("DROP TABLE IF EXISTS `forum_subcat`");
mysql_query ("DROP TABLE IF EXISTS `forum_topics`");
mysql_query ("DROP TABLE IF EXISTS `log`");
mysql_query ("DROP TABLE IF EXISTS `misc`");
mysql_query ("DROP TABLE IF EXISTS `navigation`");
mysql_query ("DROP TABLE IF EXISTS `online`");
mysql_query ("DROP TABLE IF EXISTS `pm`");
mysql_query ("DROP TABLE IF EXISTS `poll`");
mysql_query ("DROP TABLE IF EXISTS `poll_votes`");
mysql_query ("DROP TABLE IF EXISTS `template`");
mysql_query ("DROP TABLE IF EXISTS `users`");
mysql_query ("DROP TABLE IF EXISTS `weblink`");
//-----------------------------------------------------------------
// Write the tables
//-----------------------------------------------------------------
mysql_query ("CREATE TABLE `ads` ( `id` int(11) NOT NULL auto_increment, `name` text NOT NULL, `loc` int(11) NOT NULL default '0', `type` varchar(10) NOT NULL default '', `banner` text NOT NULL, `link` text NOT NULL, `text` text NOT NULL, `width` int(11) default NULL, `height` int(11) default NULL, PRIMARY KEY (`id`)) TYPE=MyISAM AUTO_INCREMENT=3 ;");
mysql_query ("CREATE TABLE `ads_cfg` ( `id` int(11) NOT NULL default '0', `lname` text NOT NULL, `cname` text NOT NULL, `cname2` text NOT NULL, `rname` text NOT NULL, `lactive` int(15) NOT NULL default '0', `cactive` int(15) NOT NULL default '0', `c2active` int(15) NOT NULL default '0', `ractive` int(15) NOT NULL default '0', `text` text NOT NULL, PRIMARY KEY (`id`)) TYPE=MyISAM;");
mysql_query ("CREATE TABLE `articles` ( `id` int(10) NOT NULL auto_increment, `article_name` varchar(255) NOT NULL default '', `article_url` varchar(100) NOT NULL default '', `author_id` varchar(200) NOT NULL default '0', `author_name` varchar(100) NOT NULL default '', `hit_count` int(10) NOT NULL default '0', `description` text NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=1 ;");
mysql_query ("CREATE TABLE `badwords` ( `id` int(11) NOT NULL auto_increment, `word` varchar(255) NOT NULL default '', `replacement` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `bans` ( `id` int(10) unsigned NOT NULL auto_increment, `user_id` int(10) NOT NULL default '0', `user_user` varchar(50) NOT NULL default '0', `banned_id` int(10) default NULL, `banned_user` varchar(50) default NULL, `ip` varchar(15) NOT NULL default '', `date` int(10) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `blocks` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', `used` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `config` ( `variable` varchar(255) NOT NULL default '', `value` text, PRIMARY KEY (`variable`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `downloads` ( `id` int(10) NOT NULL auto_increment, `name` varchar(150) NOT NULL default '', `url` varchar(200) NOT NULL default '', `author_email` varchar(100) NOT NULL default '', `author_name` varchar(50) NOT NULL default '', `added` int(10) NOT NULL default '0', `count` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=1 ;");
mysql_query ("CREATE TABLE `emoticons` ( `id` int(11) NOT NULL auto_increment, `code` varchar(255) NOT NULL default '', `pic` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `events` ( `id` int(10) unsigned NOT NULL auto_increment, `type` enum('normal','bday') NOT NULL default 'normal', `user_id` int(10) NOT NULL default '0', `user_user` varchar(50) NOT NULL default '', `day` int(2) unsigned NOT NULL default '0', `month` int(2) unsigned NOT NULL default '0', `year` int(4) unsigned default NULL, `start` int(10) unsigned NOT NULL default '0', `end` int(10) unsigned NOT NULL default '0', `message` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `forum_cat` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `order` int(10) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `forum_ranks` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', `posts` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `forum_replies` ( `id` int(10) NOT NULL auto_increment, `cat` int(10) NOT NULL default '0', `subcat` int(10) NOT NULL default '0', `topic` int(10) NOT NULL default '0', `date` int(10) NOT NULL default '0', `user_reg` enum('1','2') NOT NULL default '1', `user_id` int(10) NOT NULL default '0', `user_user` varchar(50) NOT NULL default '', `user_email` varchar(100) NOT NULL default '', `message` text NOT NULL, `ip` varchar(15) NOT NULL default '', PRIMARY KEY (`id`), FULLTEXT KEY `full_index` (`message`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `forum_subcat` ( `id` int(10) NOT NULL auto_increment, `cat` int(10) NOT NULL default '0', `name` varchar(255) NOT NULL default '', `order` int(10) NOT NULL default '0', `description` text NOT NULL, `topics` int(10) NOT NULL default '0', `replies` int(10) NOT NULL default '0', `lastpost_location` varchar(50) default NULL, `lastpost_date` int(10) default NULL, `lastpost_reg` enum('1','2') NOT NULL default '1', `lastpost_id` int(10) default NULL, `lastpost_user` varchar(50) default NULL, `lastpost_email` varchar(100) default NULL, `redirect_location` varchar(100) default NULL, `redirect_hits` int(10) default '0', `type` enum('1','2','3','4','5') NOT NULL default '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `forum_topics` ( `id` int(10) NOT NULL auto_increment, `cat` int(10) NOT NULL default '0', `subcat` int(10) NOT NULL default '0', `date` int(10) NOT NULL default '0', `name` varchar(255) NOT NULL default '', `author_reg` enum('1','2') NOT NULL default '1', `author_id` int(10) NOT NULL default '0', `author_user` varchar(50) NOT NULL default '', `author_email` varchar(100) NOT NULL default '', `views` int(10) NOT NULL default '0', `lastpost_location` varchar(50) NOT NULL default '', `lastpost_date` int(10) NOT NULL default '0', `lastpost_reg` enum('1','2') NOT NULL default '1', `lastpost_id` int(10) NOT NULL default '0', `lastpost_user` varchar(50) NOT NULL default '', `lastpost_email` varchar(100) NOT NULL default '', `type` enum('1','2','3') NOT NULL default '1', `mode` enum('1','2','3') NOT NULL default '3', `redirect_cat` int(10) NOT NULL default '0', `redirect_subcat` int(10) NOT NULL default '0',
`redirect_topic` int(10) NOT NULL default '0', `redirect_hits` int(10) NOT NULL default '0', `ip` varchar(15) NOT NULL default '', PRIMARY KEY (`id`), FULLTEXT KEY `full_index` (`name`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `log` ( `id` int(10) NOT NULL auto_increment, `user_id` int(10) NOT NULL default '0', `user_user` varchar(50) NOT NULL default '', `log` text NOT NULL, `date` int(10) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `misc` ( `variable` varchar(255) NOT NULL default '', `value` text, PRIMARY KEY (`variable`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `navigation` ( `id` int(10) NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', `link` text NOT NULL, `target` enum('self','blank') NOT NULL default 'self', `order` int(10) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `online` ( `id` int(10) unsigned NOT NULL auto_increment, `sid` varchar(32) NOT NULL default '', `type` enum('live','log') NOT NULL default 'live', `status` enum('guest','member') NOT NULL default 'guest', `user` varchar(50) default NULL, `user_id` int(10) unsigned default NULL, `user_authorization` enum('1','2','3','4') default NULL, `user_email` varchar(50) default NULL, `user_hideemail` int(1) unsigned default NULL, `user_flag` varchar(10) default NULL, `user_location` varchar(50) default NULL, `ip` varchar(15) default NULL, `refer` varchar(100) default NULL, `browser` text NOT NULL, `lang` varchar(10) default NULL, `date` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `pm` ( `id` int(10) NOT NULL auto_increment, `s_user_id` int(10) NOT NULL default '0', `s_user_user` varchar(50) NOT NULL default '', `r_user_id` int(10) NOT NULL default '0', `r_user_user` varchar(50) NOT NULL default '', `s_date` int(10) NOT NULL default '0', `r_date` varchar(15) NOT NULL default 'unread', `subject` varchar(50) NOT NULL default '', `message` text NOT NULL, `s_delete` enum('0','1') NOT NULL default '0', `r_delete` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `poll` ( `id` int(10) NOT NULL auto_increment, `date` int(10) NOT NULL default '0', `question` varchar(255) NOT NULL default '', `option1` varchar(50) default NULL, `option2` varchar(50) default NULL, `option3` varchar(50) default NULL, `option4` varchar(50) default NULL, `option5` varchar(50) default NULL, `option6` varchar(50) default NULL, `option7` varchar(50) default NULL, `option8` varchar(50) default NULL, `option9` varchar(50) default NULL, `option10` varchar(50) default NULL, `votes1` int(10) default NULL, `votes2` int(10) default NULL, `votes3` int(10) default NULL, `votes4` int(10) default NULL, `votes5` int(10) default NULL, `votes6` int(10) default NULL, `votes7` int(10) default NULL, `votes8` int(10) default NULL, `votes9` int(10) default NULL, `votes10` int(10) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `poll_votes` ( `id_poll` int(10) NOT NULL, `id_user` int(10) NOT NULL, `date_vote` text NOT NULL) ENGINE=InnoDB;");
mysql_query ("CREATE TABLE `template` ( `id` int(10) unsigned NOT NULL auto_increment, `mode` enum('right','left') NOT NULL default 'right', `name` text NOT NULL, `order` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL auto_increment, `authorization` enum('1','2','3','4') NOT NULL default '1', `username` varchar(50) NOT NULL default '', `password` varchar(32) NOT NULL default '', `email` varchar(50) NOT NULL default '', `url` varchar(100) default NULL, `age` int(10) unsigned default NULL, `flag` varchar(10) default NULL, `location` varchar(50) default NULL, `registered` int(10) unsigned NOT NULL default '0', `lastvisit` int(10) unsigned NOT NULL default '0', `forum_lastvisit` int(10) NOT NULL default '0', `ip` varchar(15) NOT NULL default '', `forumposts` int(10) unsigned NOT NULL default '0', `signature` text, `aboutme` text, `msn` varchar(50) default NULL, `yahoo` varchar(20) default NULL, `icq` varchar(12) default NULL, `aim` varchar(20) default NULL, `skype` varchar(20) default NULL, `avatar` text, `hideemail` int(1) unsigned NOT NULL default '0',
`calendarbday` int(1) unsigned NOT NULL default '0', `status` enum('ready','activate','forgot','banned','invizib le') NOT NULL default 'activate', `multikey` varchar(20) default NULL, `actime` int(10) unsigned default NULL, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`), UNIQUE KEY `email` (`email`), FULLTEXT KEY `full_index` (`username`) ) ENGINE=MyISAM ; ");
mysql_query ("CREATE TABLE `weblink` ( `id` int(11) NOT NULL auto_increment, `user_id` int(10) NOT NULL default '0', `user_user` varchar(50) NOT NULL default '', `adress` varchar(200) NOT NULL default '', `title` varchar(200) NOT NULL default '', `content` text NOT NULL, `status` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`)) TYPE=MyISAM AUTO_INCREMENT=13 ;");
//-----------------------------------------------------------------
// Write default rows
//-----------------------------------------------------------------
mysql_query ("INSERT INTO `blocks` VALUES (18, 'b_calendar', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (19, 'b_forum', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (20, 'b_login', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (21, 'b_nav', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (22, 'b_poll', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (23, 'b_stats', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (24, 'b_today', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (25, 'b_debug', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (26, 'b_shoutbox', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (27, 'b_ads', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (28, 'b_ads2', '1') ");
mysql_query ("INSERT INTO `blocks` VALUES (29, 'b_lastarticles', '1') ");
mysql_query ("INSERT INTO `config` VALUES ('template', 'extended') ");
mysql_query ("INSERT INTO `config` VALUES ('language', 'fa.php') ");
mysql_query ("INSERT INTO `config` VALUES ('verify_reg', '1') ");
mysql_query ("INSERT INTO `config` VALUES ('avatar_size', '50240') ");
mysql_query ("INSERT INTO `config` VALUES ('maintance_message', 'یک پیام آزمایشی برای نمایش در حالت تعمیر و بازسازی: این سایت در حال تعمیر و بازسازی است و به زودی به حالت اول بازخواهد گشت.') ");
mysql_query ("INSERT INTO `config` VALUES ('maintance', '0') ");
mysql_query ("INSERT INTO `config` VALUES ('ban_message', 'این یک پیام آزمایشی رئیس کل برای نمایش برای کاربر منع شده می باشد که می تواند در قسمت تنظیمات سایت تغییر یابد! این پیام پیش فرض است !') ");
mysql_query ("INSERT INTO `config` VALUES ('nav_news', '10') ");
mysql_query ("INSERT INTO `config` VALUES ('nav_log', '25') ");
mysql_query ("INSERT INTO `config` VALUES ('nav_users', '25') ");
mysql_query ("INSERT INTO `config` VALUES ('nav_bans', '25') ");
mysql_query ("INSERT INTO `config` VALUES ('nav_pm', '25') ");
mysql_query ("INSERT INTO `config` VALUES ('inbox_msg', '50') ");
mysql_query ("INSERT INTO `config` VALUES ('sentbox_msg', '50') ");
mysql_query ("INSERT INTO `config` VALUES ('terms_tg', '1') ");
mysql_query ("INSERT INTO `config` VALUES ('terms_txt', 'این یک سایت ناز با کاربران نازنین می باشد، و ما می خواهیم آن ها را در این وضعیت حفظ کنیم. برای این کار قوانینی ایجاد کرده ایم:\n- \n
- شما در قبال پروفایل و پست های خود در انجمن مسئول هستید.\n
- شما فقط می توانید یک پروفایل برای خود بسازید، و داشتن پروفایل بیشتر ممکن نیست.\n
- در این سایت مطالب غیراخلاقی و لینک ها و عکس های غیراخلاقی قرار نخواهد گرفت.\n
- شما نمی توانید در این سایت برای خود تبلیغ کنید مگر آن که با رئیس کل توافق کرده باشید.\n
- لینک های فریبنده و غیرمجاز باعث حذف حساب کاربری شما خواهد شد.\n
- عکس ها و لینک های مستهجن اجازه ارسال ندارند.\n
- آزادی بیان فقط برای افرادی است که نظر شخصی خود را بدون توهین و بی احترامی به دیگران ابراز کنند.\n
- هرچیزی که سرعت سایت را کم کند و یا ارتباط سایت را قطع کند غیرقابل قبول است.\n
- مدیران و معاونان در صورتی که شما اشتباهی مرتکب شوید می توانند با و یا بدون اطلاع قبلی حساب کاربری شما را حذف کنند. \n
- زبان استفاده در این سایت فقط فارسی است.\n
') ");
mysql_query ("INSERT INTO `config` VALUES ('bbcode', '1') ");
mysql_query ("INSERT INTO `config` VALUES ('emoticons', '1') ");
mysql_query ("INSERT INTO `config` VALUES ('badwords', '1') ");
mysql_query ("INSERT INTO `config` VALUES ('badword_mode', '1') ");
mysql_query ("INSERT INTO `config` VALUES ('forum_name', 'فهرست انجمن ژوپر') ");
mysql_query ("INSERT INTO `config` VALUES ('forum_guest_reply', '0') ");
mysql_query ("INSERT INTO `config` VALUES ('forum_guest_topic', '0') ");
mysql_query ("INSERT INTO `config` VALUES ('nav_topics', '25') ");
mysql_query ("INSERT INTO `config` VALUES ('nav_replies', '15') ");
mysql_query ("INSERT INTO `config` VALUES ('forum_guest_see', '1') ");
mysql_query ("INSERT INTO `config` VALUES ('forum_hot', '100') ");
mysql_query ("INSERT INTO `ads_cfg` ( `id` , `lname` , `cname` , `cname2` , `rname` , `lactive` , `cactive` , `c2active` , `ractive` , `text` ) VALUES ('1', 'بلوک راست', 'تبلیغات مرکزی', 'دوستان', 'بلوک چپ', '0', '0', '0', '0', 'تبلیغ شما در اینجا؟');");
mysql_query ("INSERT INTO `emoticons` VALUES (1, ':)', 'smile.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (2, ':(', 'sad.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (3, ':D', 'biggrin.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (4, ';)', 'wink.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (5, '--', 'arrow.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (6, '0_o', 'blink.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (7, ':8', 'cool.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (8, ';(', 'crying.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (9, 'V_0', 'dry.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (10, '!!', 'exclamation.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (11, '!?', 'huh.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (12, ':X', 'laugh.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (13, ':@', 'mad.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (14, ':o', 'ohmy.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (15, ':#', 'ph34r.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (16, ':!', 'puke.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (17, '??', 'question.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (18, '^_^', 'rolleyes.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (19, ':P', 'tongue.gif') ");
mysql_query ("INSERT INTO `emoticons` VALUES (21, ':$', 'unsure.gif') ");
mysql_query ("INSERT INTO `forum_ranks` VALUES (9, 'کاربر تازه وارد', 1) ");
mysql_query ("INSERT INTO `forum_ranks` VALUES (10, 'کاربر خوب', 50) ");
mysql_query ("INSERT INTO `forum_ranks` VALUES (11, 'کاربر فعال', 100) ");
mysql_query ("INSERT INTO `forum_ranks` VALUES (12, 'کاربر اصلی', 200) ");
mysql_query ("INSERT INTO `forum_ranks` VALUES (13, 'کاربر ارشد', 500) ");
mysql_query ("INSERT INTO `misc` VALUES ('total_hits', '0') ");
mysql_query ("INSERT INTO `misc` VALUES ('unique_hits', '0') ");
mysql_query ("INSERT INTO `misc` VALUES ('totalonline', '0') ");
mysql_query ("INSERT INTO `navigation` VALUES (1, ' » صفحه ی اصلی', 'index.php', 'self', 0) ");
mysql_query ("INSERT INTO `navigation` VALUES (2, ' » انجمن های گفتگو', '?n=modules/forum', 'self', 1) ");
mysql_query ("INSERT INTO `navigation` VALUES (3, ' » لیست مقالات', '?n=modules/articles', 'self', 1) ");
mysql_query ("INSERT INTO `navigation` VALUES (4, ' » دانلود', '?n=modules/download', 'self', 2) ");
mysql_query ("INSERT INTO `navigation` VALUES (5, ' » لینکستان', '?n=modules/weblink', 'self', 3) ");
mysql_query ("INSERT INTO `navigation` VALUES (6, ' » لیست اعضاء', '?n=modules/users', 'self', 4) ");
mysql_query ("INSERT INTO `navigation` VALUES (7, ' » جستجو', '?n=modules/search', 'self', 5) ");
mysql_query ("INSERT INTO `template` VALUES (1, 'left', 'b_nav', 1) ");
mysql_query ("INSERT INTO `template` VALUES (2, 'left', 'b_lastarticles', 2) ");
mysql_query ("INSERT INTO `template` VALUES (3, 'left', 'b_calendar', 3) ");
mysql_query ("INSERT INTO `template` VALUES (4, 'left', 'b_today', 4) ");
mysql_query ("INSERT INTO `template` VALUES (5, 'left', 'b_shoutbox', 5) ");
mysql_query ("INSERT INTO `template` VALUES (6, 'right', 'b_login', 1) ");
mysql_query ("INSERT INTO `template` VALUES (7, 'right', 'b_stats', 2) ");
mysql_query ("INSERT INTO `template` VALUES (8, 'right', 'b_forum', 3) ");
mysql_query ("INSERT INTO `template` VALUES (9, 'right', 'b_poll', 4) ");
mysql_query ("INSERT INTO `template` VALUES (10, 'right', 'b_debug', 5) ");
mysql_query ("INSERT INTO `config` VALUES ('announcement_title', 'خوش آمدید!'); ");
mysql_query ("INSERT INTO `config` VALUES ('announcement_message','به نام خدا
سلام،
حجت اله محمدرضائی فارسی ساز سیستم مدیریت محتوای ژوپیتر، نصب موفقیت آمیز سیستم را به شما تبریک می گوید.
این یک پیام آزمایشی برای نمایش در تابلوی اعلانات است که شما می توانید برای تغییر و یا غیرفعال کردن آن به قسمت مدیریت سایت بروید.
موفق باشید
شهریور 1386
[ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]
'); ");
mysql_query ("INSERT INTO `config` VALUES ('announcements', '1'); ");
//-----------------------------------------------------------------
// Set all information
//-----------------------------------------------------------------
$time = time();
$ip = find_ip();
$password = md5($regpassword);
//-----------------------------------------------------------------
// Write the config and the webmaster
//-----------------------------------------------------------------
mysql_query ("INSERT INTO `config` VALUES ('website_name', '$regwebsitename') ");
mysql_query ("INSERT INTO `config` VALUES ('webmaster_name', '$regusername') ");
mysql_query ("INSERT INTO `config` VALUES ('webmaster_email', '$regemail') ");
mysql_query ("INSERT INTO `misc` VALUES ('site_opened', '$time') ");
mysql_query ("INSERT INTO `users`(authorization, username, password, email, flag, registered, lastvisit, ip, status) VALUES (4, '$regusername', '$password', '$regemail', 'none', '$time', '$time', '$ip', 'ready') ");
//-----------------------------------------------------------------
// Check for Updates
//-----------------------------------------------------------------
$update = @file_get_contents("http://www.jupiterportal.com/index.php?n=modules/update&a=1&d=$url");
if($update == TRUE)
{
if($version != $update)
{
?>
<tr class="bottom"><td><font color='red'>پیام !!!</font></td></tr>
<tr>
<td class="con1">نسخه ی جدید (<?=$update?>) در سایت <a href="http://www.jupiterportal.com" target="_blank">www.jupiterportal.com</a> ارائه شده است. هرچه زودتر آپدیت کنید !!</td>
</tr>
<?
}
}
//-----------------------------------------------------------------
// Show last step
//-----------------------------------------------------------------
?>
<tr class="bottom"><td>اطلاعات نصب</td></tr>
<tr>
<td class="con1">سیستم مدیریت محتوای ژوپیتر فارسی - ژوپر با موفقیت نصب شد.<br>شما حالا می توانید به <a href="<?= $PHP_SELF ?>">صفحه ی اصلی</a> بروید.<br><br><font color=red><b>اخطار !!!</b></font><br>فایل Install.php به دلایل امنیتی به نام w-old-install.php تغییر یافت. لطفا این فایل را هم از روی سرور حذف کنید.</td>
</tr>
<?
//-----------------------------------------------------------------
// Attempt Rename install.php
//-----------------------------------------------------------------
@rename("install.php", "w-old-install.php");
}
//-----------------------------------------------------------------
// Show script introduction
//-----------------------------------------------------------------
else
{
?>
<tr>
<td class="con1"><img src="images/name.jpg" border="0" width="220" height="70" alt=""></td>
<td class="con1" valign="top">
به نام خدا. سلام، <br><br>
از شما به خاطر انتخاب سیستم مدیریت محتوای ژوپیتر فارسی - ژوپر برای ایجاد سایت خود متشکریم.<br>
اگر شما به هرگونه مشکل و یا خطایی در این اسکریپت برخورد کردید، از هنگام نصب تا مدیریت، همیشه می توانید راهنمایی های ما را در <a href="http://www.jupiterportal.com" target="_blank">Jupiterportal.com</a> دریافت کنید.<br><br>
این سیستم شما را برای نصب تمام مراحل و تنظیم اسکریپت راهنمایی خواهد کرد.
</td>
</tr>
<tr>
<td colspan="2" class="con1" align="left">
<input type="hidden" name="a" value="chmod_check">
<input type="submit" style="width:100" class="box" value="بعدی">
</td>
</tr>
<?
}
//-----------------------------------------------------------------
// Show instalation footer
//-----------------------------------------------------------------
?>
</table>
</form>
</center>
</body>
</html>[/PHP]