Example #1
0
 function SettingProcess()
 {
     if ($_POST["NewName"]) {
         $NewName = $_POST["NewName"];
         if (is_numeric(strpos($NewName, "\t"))) {
             ShowError('error1');
             return false;
         }
         $NewName = trim($NewName);
         $NewName = stripslashes($NewName);
         if (!$NewName) {
             ShowError('Name is blank.');
             return false;
         }
         $length = strlen($NewName);
         if (0 == $length || 16 < $length) {
             ShowError('1 to 16 letters?');
             return false;
         }
         $userName = userNameLoad();
         if (in_array($NewName, $userName)) {
             ShowError("该名称已被使用。", "margin15");
             return false;
         }
         if (!$this->TakeMoney(NEW_NAME_COST)) {
             ShowError('money not enough');
             return false;
         }
         $OldName = $this->name;
         $NewName = htmlspecialchars($NewName, ENT_QUOTES);
         if ($this->ChangeName($NewName)) {
             ShowResult("Name Changed ({$OldName} -> {$NewName})", "margin15");
             //return false;
             userNameAdd($NewName);
             return true;
         } else {
             ShowError("?");
             //名前が同じ?
             return false;
         }
     }
     if ($_POST["setting01"]) {
         if ($_POST["record_battle_log"]) {
             $this->record_btl_log = 1;
         } else {
             $this->record_btl_log = false;
         }
         if ($_POST["no_JS_itemlist"]) {
             $this->no_JS_itemlist = 1;
         } else {
             $this->no_JS_itemlist = false;
         }
     }
     if ($_POST["color"]) {
         if (strlen($_POST["color"]) != 6 && !ereg("^[0369cf]{6}", $_POST["color"])) {
             return "error 12072349";
         }
         $this->UserColor = $_POST["color"];
         ShowResult("Setting changed.", "margin15");
         return true;
     }
 }
Example #2
0
					<td height="33">PHP版本号: <?php 
echo PHP_VERSION;
?>
</td>
					<td>GDLibrary: <?php 
echo ShowResult(function_exists('imageline'));
?>
</td>
				</tr>
				<tr>
					<td height="33">MySql版本: <?php 
echo $dosql->GetVersion();
?>
</td>
					<td height="28">ZEND支持: <?php 
echo ShowResult(function_exists('zend_version'));
?>
</td>
				</tr>
				<tr class="nb">
					<td height="33" colspan="2">支持上传的最大文件:<?php 
echo ini_get('upload_max_filesize');
?>
</td>
				</tr>
			</table>
		</div>
	</div>
	<div class="rightArea">
		<div class="homeEvent">
			<h2 class="title">日志<span><a href="sysevent.php">更多&gt;&gt;</a></span></h2>
Example #3
0
File: search.php Project: OvBB/v1.0
define('PARENT', 17);
define('ISOPEN', 18);
define('NEWPOSTS', 19);
define('URL', 0);
define('ALT', 1);
// Do they have authorization to use the Search engine?
if (!$_SESSION['permissions']['csearch']) {
    // No. Let them know the bad news.
    Unauthorized();
}
// Get the information of each forum.
list($aCategory, $aForum) = GetForumInfo();
// What are they wanting to do?
switch ($_REQUEST['action']) {
    case 'showresult':
        ShowResult();
    case 'query':
        Query();
    case 'finduser':
        FindUser();
    case 'getnew':
        GetNewPosts();
    case 'getdaily':
        GetDailyPosts();
}
// Search page template
require "./skins/{$CFG['skin']}/search/main.tpl.php";
// *************************************************************************** \\
function Query()
{
    // Are they searching by keyword or username?