예제 #1
0
파일: fns.php 프로젝트: joswilson/NotJustOK
/**
 * Display a page if the file exists, otherwise displays a 404.
 *
 * @param string $sPage The page.
 * @return void
 */
function get_page($sPage)
{
    if (is_file($sPage)) {
        $sPage = file_get_contents($sPage);
        echo parse_var($sPage);
    } else {
        // Set the Not Found page
        error_404();
    }
}
예제 #2
0
파일: db.php 프로젝트: enewe101/snips
function get_var($var_name)
{
    if (isset($_GET[$var_name])) {
        return parse_var($_GET[$var_name]);
    } else {
        if (isset($_POST[$var_name])) {
            return parse_var($_POST[$var_name]);
        }
    }
    return NULL;
}
예제 #3
0
echo VI_DBMODPRE;
?>
</em>)</div>
    
    <?php 
//////////////////////////////
function parse_var($string)
{
    global $_G;
    return str_replace(array('{aid}'), array($_G['manager']['id']), $string);
}
$stat = array();
foreach ($_CACHE['system']['module'] as $appid => $app) {
    if ($app['statis']) {
        $person = System::$db->getValue(parse_var($app['statis']['person']));
        $public = System::$db->getValue(parse_var($app['statis']['public']));
        $stat['cate'][] = $app['name'];
        $stat['data']['person'][] = $person;
        $stat['data']['public'][] = $public - $person;
    }
}
//关闭数据库
System::connect();
?>
    
    <div id="bind_module" style="height:<?php 
echo 200 + count($stat['cate']) * 30;
?>
px;"></div>
    
    <script>