Beispiel #1
0
// {
//RIGHT LIMITATION END
if ($cmd == "myprof") {
    $go = cmsg("A_MY_PROF");
    displayconfigtblsd();
    exit;
}
// CFG OPT FUTURE  TODO:
// Убирание меню в редакторе и поиске.  // nomnu=1 включать для unframedmode
//if (!$pr[8]) echo "DEBUG MODE:dont try to fix me im not broken<br>";
echo "<cite>" . cmsg("A_WELC") . $prauth[$ADM][15] . " <br></cite>";
if ($nokeys == 1) {
    nokeys(1);
}
if ($daysleft < 1) {
    expire();
}
if ($write == 1) {
    $act = "Write data";
    logwrite($act);
    write();
    dispref();
    exit;
}
if ($write == 2) {
    $act = "Write tbldata {$tbl}";
    logwrite($act);
    writeconfigtbl();
    dispref();
    exit;
}
Beispiel #2
0
                    $update_equipment = mysql_query("UPDATE users SET drink_end_time='{$time}'+'{$drink_time}' WHERE id='{$id_user}'");
                    $update_equip_table = mysql_query("INSERT items_equiped (id_item,id_user,type) VALUES ({$id_item}, {$id_user},{$type})");
                    $update_stats = mysql_query("UPDATE users SET power=power+{$new_power}, fastness=fastness+{$new_fastness}, agility=agility+{$new_agility}, energy=energy+{$new_energy}, endurance=endurance+{$new_endurance}, money=money-{$money} WHERE id='{$id_user}'");
                    Header("Location: ./?m=shop&item_type=3");
                }
            }
        }
    }
}
if (isset($_GET['item_type'])) {
    $item_type = $_GET['item_type'];
} else {
    $item_type = 1;
}
if ($item_type == 3) {
    echo '<b>You need to wait ' . expire($user['drink_end_time']) . ' until you can buy a new drink</b><br>';
}
// find out how many rows are in the table
$sql = "SELECT COUNT(id) FROM items WHERE type={$item_type}";
$result = mysql_query($sql) or trigger_error("SQL", E_USER_ERROR);
$r = mysql_fetch_row($result);
$numrows = $r[0];
// number of rows to show per page
$rowsperpage = 6;
// find out total pages
$totalpages = ceil($numrows / $rowsperpage);
// get the current page or set a default
if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) {
    // cast var as int
    $currentpage = (int) $_GET['currentpage'];
} else {
Beispiel #3
0
<?php

#Weird method to replace generation files with real cache
#if(J10){die(pre($_GET));}
#recrée le fichier html - appelé depuis chaque fichier en cache html local
#et donc, si le fichier appelle un header, le fichier html final mérite bien de charger le localcache
expire('90000');
e(',localcache');
#,Av($a,U,is_file($x));
$x = DR . U;
/*$_ENV['c']['htmlcache']=Array($x,'<?require_once RT."localcache.php";?>','<!--cache:localhtml-->');*/
#av(__FILE__.__LINE__,preg_match("~\.(html?)~i",U));
if (is_file($x) && preg_match('#\\.html?#', U)) {
    #pour les fichiers php qui n'acceptent aucun paramètre - sauf qu'on ne le sait qu'à la fin !!!!
    if (is_file($x . '.inc')) {
        unlink($x);
        rename($x . '.inc', $x);
        require_once $x;
        kill();
    } else {
        unlink($x);
    }
    #or else it has nothing to do here !!
    #Av($a['SCRIPT_FILENAME'],$x);
    if (0) {
        #||$_ENV['htmlcache']=1
        if (filemtime($x) < NOW && filesize($x) < 15000) {
            #expiré
            if (is_file($x)) {
                e(",{$x} is file");
                #L'url correspond bien un fichier physique de Génération HTML
		
			<table border="0" width="100%" cellspacing="2" cellpadding="2" class="trans">
				<tr>
					<td width="100%">
					<span style="font-size:15px;font-weight:bold;color:#1E7BBB ;"><?php 
echo $lang['menu_premium'];
?>
</span><br/>
					<br>
					<?php 
if ($user['premium'] == 1) {
    $premium = mysql_fetch_array(mysql_query("SELECT * FROM premium_history WHERE user_id='{$user['id']}'"));
    ?>
					Already using premium services.	Your premium account expire after <?php 
    echo expire($premium['premium_expire']);
    ?>
.
					<?php 
} else {
    ?>
					<b>Use premium account and get our bonuses.<b><br/>
					+<?php 
    echo $web['premium_bonus_force'];
    ?>
 force, +<?php 
    echo $web['premium_bonus_agility'];
    ?>
 agility, +<?php 
    echo $web['premium_bonus_endurance'];
    ?>
Beispiel #5
0
        if (!$find) {
            error('<h2>錯誤</h2>
<p class="error">刪除錯誤:密碼錯誤</p>');
        }
        $act = '';
    } elseif ($act == 'down') {
        $qry = 'SELECT * FROM upload WHERE id = ' . intval($id);
        $rs = sqlite_query($conn, $qry);
        $row = sqlite_fetch_array($rs);
        if (!$row) {
            error('<h2>錯誤</h2>
<p class="error">下載錯誤:此檔案找不到</p>');
        }
        if ($row['tlim'] || $row['dlim']) {
            if ($row['tlim'] && time() + $tz * 60 * 60 >= $row['utime'] + $row['tlim'] * 60 || $row['dlim'] && $row['dcnt'] >= $row['dlim']) {
                expire($id);
            }
        }
        $qry = 'SELECT * FROM upload WHERE id = ' . $id;
        $rs = sqlite_query($conn, $qry);
        $row = sqlite_fetch_array($rs);
        if (!$row['utime']) {
            error('<h2>錯誤</h2>
<p class="error">下載錯誤:此檔案已失效</p>');
        }
        $txt = "<h2>下載</h2>\r\n<form method=\"post\" action=\"{$PHP_SELF}\">\r\n<p><input type=\"hidden\" name=\"act\" value=\"get\" /><input type=\"hidden\" name=\"id\" value=\"{$row['id']}\" /></p>\r\n<h3>下載檔案</h3>\r\n<p>您將要下載檔案 {$prefix}" . padNum($id) . ".{$row['ext']}。</p><fieldset><legend>備注:</legend>{$row['com']}</fieldset>";
        if ($row['dpwd'] != '*') {
            $txt .= '<p>請輸入下載密碼:<input type="password" size="10" name="downpass" maxlength="10" class="box" tabindex="3" accesskey="3" /></p>';
        }
        $txt .= "<p>檔案名稱:<label><input type='radio' name='name' value='gen' checked='checked'/>{$prefix}" . padNum($id) . ".{$row['ext']}</label> " . ($row['upfile_name'][0] != '*' ? "<label><input type='radio' name='name' value='user'/>{$row['upfile_name']}</label> </p>" : '') . "\r\n<p><input type=\"submit\" value=\"下載\" tabindex=\"8\" accesskey=\"8\" /></p>\r\n</form>\r\n";
        error($txt);
Beispiel #6
0
function h($x)
{
    #£good:universal headers control
    if ($x != 200) {
        e(',h!200,noperf');
    }
    switch ($x) {
        case 'xsl':
        case 'gss':
            expire();
            header("Content-type: xslt+xml");
            break;
        case '200':
            header('status:200', 1, 200);
            break;
        case 'jpg':
            expire(1200000);
            header("Content-type: image/jpg", 1, 200);
            break;
        case 'rss':
            expire();
            header("Content-type: application/xml");
            break;
        case 'css':
            expire(3600);
            header("Content-type: text/css");
            break;
        case 'js':
        case 'j':
            expire(3600);
            Header("Content-type: application/x-javascript");
            break;
    }
}