View file admincp/system.php

File size: 5.8Kb
<?php
# Ma nguon ULoKI Forum v2.1 Editor by Quochuy - Vietnam
# E-mail kutebin@gmail.com
# Site http://quochuy.wen.ru
# All rights are reserved by the script! Ie me! The script is forbidden to distribute, and/or sell without the consent of the author!
# Phone +82.10.4964.4150

	require("../include/init.php");
	
	if($group[$user->groupid]['type'] < 3)
	{
		forward("index.php");
	}

?>
	
	
<?php
	include "../header.php"; 
	?>
	<title>Admin CP - <?php echo $config->title;?></title>
		

	<?php
	include "../title.php"; 
	?>
	
	<?php

	include "../navbar.php"; 
	?>
<?php

        if(!$_POST) {
echo '<div class="catSides">System Settings:</div>
<form action="system.php" method="post">
<div class="row1">Member register:<br>
<select size="1" name="register">
<option value="1" '.sel(1,$config->register).'>ON</option>
<option value="0" '.sel(0,$config->register).'>OFF</option>
</select><br>

If 1 then email will be sent to user to activate account. If 0 then email will not sent, i.e user will get direct registered:<br>
<select size="1" name="requirekey">
<option value="1" '.sel(1,$config->requirekey).'>ON</option>
<option value="0" '.sel(0,$config->requirekey).'>OFF</option>
</select><br>

File upload allowed or not:<br>
<select size="1" name="uploadfile">
<option value="1" '.sel(1,$config->uploadfile).'>ON</option>
<option value="0" '.sel(0,$config->uploadfile).'>OFF</option>
</select><br>

Guest post blog allowed or not:<br>
<select size="1" name="guestpostblog">
<option value="1" '.sel(1,$config->guestpostblog).'>ON</option>
<option value="0" '.sel(0,$config->guestpostblog).'>OFF</option>
</select><br>

BOT ĐẶT CÂU HỎI:<br>
<select size="1" name="bot_question">
<option value="1" '.sel(1,$config->bot_question).'>ON</option>
<option value="0" '.sel(0,$config->bot_question).'>OFF</option>
</select><br>

LEFT NAVBAR:<br>
<select size="1" name="left_navbar">
<option value="1" '.sel(1,$config->left_navbar).'>ON</option>
<option value="0" '.sel(0,$config->left_navbar).'>OFF</option>
</select>

</div>

<div class="row1">Provide the title for website:<br>
<input name="title" type="text" value="'.$config->title.'"><br>
The keywords for website:<br>
<input name="keywords" type="text" value="'.$config->keywords.'"><br>
The link logo for website:<br>
<input name="logo" type="text" value="'.$config->logo.'"><br>
URL of the forum by which you will access it. Don\'t forget to add trailing slash:<br>
<input name="url" type="text" value="'.$config->url.'"><br>
Provide Admin email through this email, all emails will be sent.:<br>
<input name="adminemail" type="text" value="'.$config->adminemail.'"><br>
Maximum PM user should have in inbox:<br>
<input name="maxpm" type="text" value="'.$config->maxpm.'"><br>
Maximum Chat should have in chatbox:<br>
<input name="maxchat" type="text" value="'.$config->maxchat.'"><br>
File uploading allowed is 5MB. Put only integer value, Don\'t put MB value:<br>
<input name="uploadlimit" type="text" value="'.$config->uploadlimit.'"><br>


File extensions allowed for uploading.	Write in lower case using , (comma) seperated:<br>
<input name="uploadext" type="text" value="'.$config->uploadext.'"><br>

Number of threads to be shown on page:<br>
<input name="numthreadsperpage" type="text" value="'.$config->numthreadsperpage .'"><br>

Number of posts/replies to be shown on page:<br>
<input name="numrepliesperpage" type="text" value="'.$config->numrepliesperpage.'"><br>

Name of cookie. Remember if you dont know meaning of this then dont change this.:<br>
<input name="cookie" type="text" value="'.$config->cookie.'"><br>

Don\'t change this folder name. This folder is used to store all files. Even if you change this:<br>
then change the folder at your web server also.<br>
<input name="filestore" type="text" value="'.$config->filestore.'"><br>

Số ký tự hiển thị của bài viết blog:<br>
<input name="numtextentry" type="text" value="'.$config->numtextentry.'"><br>
Timezone: <br>
<select name="timezone">';
?>
<?php
$array = array(
'-12','-12.5','-11','-11.5','-10','-10.5','-9','-9.5','-8','-8.5','-7','-7.5','-6','-6.5','-5','-5.5','-4','-4.5','-3','-3.5','-2','-2.5','-1','-1.5','0','+1','+1.5','+2','+2.5','+3','+3.5','+4','+4.5','+5','+5.5','+6','+6.5','+7','+7.5','+8','+8.5','+9','+9.5','+10','+10.5','+11','+11.5','+12','+12.5');
for($i=0; $i<49; $i++)
{
echo'<option value = "'.$array[$i].'"'.sel($array[$i],$config->timezone).'>GMT '.$array[$i].'</option>';
}

echo'</select><br>

Style:<br/>';
?>
	<?php
	echo'<select size = "1" name = "style">';
	foreach(glob('../css/'.'*.css',GLOB_NOESCAPE) as $var) {
     $value = htmlspecialchars(pathinfo($var,PATHINFO_FILENAME),ENT_NOQUOTES);
    echo'<option value = "'.$value.'"'.sel($value,$config->style).'>'.$value.'</option>';
}
echo'</select> 
<br>
<input type="submit" value="Save">
</div></form>';
	}
	else
	{
$db->update_data("UPDATE c_settings SET 
register='$_POST[register]',
title='$_POST[title]',
logo='$_POST[logo]',
keywords='$_POST[keywords]',
left_navbar='$_POST[left_navbar]',
requirekey='$_POST[requirekey]',
uploadfile='$_POST[uploadfile]',
guestpostblog='$_POST[guestpostblog]',
bot_question='$_POST[bot_question]',
url='$_POST[url]',
adminemail='$_POST[adminemail]',
maxpm='$_POST[maxpm]',
maxchat='$_POST[maxchat]',
uploadlimit='$_POST[uploadlimit]',
uploadext='$_POST[uploadext]',
numthreadsperpage='$_POST[numthreadsperpage]',
numrepliesperpage='$_POST[numrepliesperpage]',
cookie='$_POST[cookie]',
filestore='$_POST[filestore]',
numtextentry='$_POST[numtextentry]',
timezone='$_POST[timezone]',
style='$_POST[style]'");

	forward2("admincp/system.php","2");
	err_msg("Settings","Cài đặt hệ thống lưu thành công <br/>Please wait while we redirect you to Forum");
}	

?>
<?php include "../footer.php"; ?>