当前位置: 首页>>代码示例>>PHP>>正文


PHP _header函数代码示例

本文整理汇总了PHP中_header函数的典型用法代码示例。如果您正苦于以下问题:PHP _header函数的具体用法?PHP _header怎么用?PHP _header使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_header函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: weixin_login

 function weixin_login()
 {
     global $_G;
     //微信登录需要开发者 有进行开发者认证才能继续...
     $redirect_uri = urlencode($_G['siteurl']);
     if (!$_G[setting][weixin_appkey] || !$_G[setting][weixin_appsecret]) {
         msg('抱歉,站点未开启微信登录', 'error', 'm=member&a=login');
     }
     $appid = $_G['setting']['weixin_appkey'];
     $appsecret = $_G['setting']['weixin_appsecret'];
     if (isset($_GET['code']) && isset($_GET['state'])) {
         if ($_SESSION['weixin_state_key'] != $_GET['state']) {
             msg('抱歉,CSRF验证失败');
         }
         //get token
         $code = trim_html($_GET['code']);
         $token_url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" . $appid . "&secret=" . $appsecret . "&code=" . $code . "&grant_type=authorization_code";
         $rs = fetch($token_url);
         if (!$rs) {
             msg('接口验证失败');
         }
         $data = json_decode($rs, 1);
         if ($data['errcode'] > 0 && $data['errmsg']) {
             msg($data['errmsg']);
         }
         $user_id = $data['openid'];
         //针对开发者用户唯一id
         //获取用户信息
         $url = 'https://api.weixin.qq.com/sns/userinfo?access_token=' . $data['access_token'] . '&openid=' . $user_id;
         $rs1 = fetch($url);
         if (!$rs1) {
             msg('获取用户信息失败');
         }
         $info = json_decode($rs1, 1);
         if ($info['errcode'] > 0 && $info['errmsg']) {
             msg($info['errmsg']);
         }
         $arr = array();
         $arr[login_id] = $info[unionid];
         //用户的唯一ID
         $arr[address] = $info[province] . $info[city];
         $arr[username] = $info[nickname];
         $arr[set] = intval($info[sex]);
         $arr[groupid] = 23;
         $arr[login_name] = 'weixin';
         $arr[picurl] = $info[headimgurl];
         $this->login_callback($arr);
     } else {
         if ($_GET['state'] && !$_GET['code']) {
             msg('授权取消');
         }
     }
     $state_key = authcode('weixin_login', 'ENCODE');
     //防止crfs攻略的随机字符串
     $_SESSION['weixin_state_key'] = $state_key;
     $start_url = "https://open.weixin.qq.com/connect/qrconnect?appid={$appid}&redirect_uri={$redirect_uri}&response_type=code&scope=snsapi_login&state=" . $state_key . "#wechat_redirect";
     _header("Location:" . $start_url);
 }
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:58,代码来源:member.action.php

示例2: home

function home()
{
    if (!empty($_GET)) {
        return _header('Location: /', 301);
    }
    $html_title = 'workerman 一个高性能的PHP Socket 服务器框架';
    $html_keywords = 'workerman, php socket';
    $html_desc = 'Workerman是一款纯PHP开发的开源高性能的PHP socket服务器框架。支持TCP长连接,支持Websocket等诸多协议。被广泛的用于手机app、手游服务端、网络游戏服务器、聊天室、硬件通讯、智能家居、车联网、物联网等领域的开发。';
    $html_nav = 'home';
    $download_workerman_count_key = 'download_workerman_count';
    $workerman_download_count = \WorkerMan\Lib\Store::get($download_workerman_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/home.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
开发者ID:rttg125,项目名称:workerman.net,代码行数:15,代码来源:home.php

示例3: dourl

 function dourl()
 {
     $id = (int) $_GET['id'];
     $mid = (int) $_GET['mid'];
     $__TABLE__ = 'article';
     if ($mid) {
         $model = $this->iCMS->getCache('system/models.cache', $mid);
         $__TABLE__ = $model['tbn'];
     }
     $rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__" . $__TABLE__ . "` WHERE `id`='{$id}'", ARRAY_A);
     include iPATH . 'include/forum.class.php';
     $forum = new forum();
     $F = $forum->forum[$rs['fid']];
     $iurl = $this->iCMS->iurl($mid ? 'content' : 'show', array($rs, $F));
     if (stristr($iurl->href, $mid ? 'content.php' : 'show.php')) {
         $iurl->href = '../' . $iurl->href;
     }
     _header($iurl->href);
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:19,代码来源:comment.mo.php

示例4: header_404

function header_404()
{
    _header('HTTP/1.1 404 Not Found');
    //_header('location: /404.html');
    $sys = explode('/', $_SERVER['SERVER_SOFTWARE']);
    $c404 = "<html>\n<head><title>404 Not Found</title></head>\n<body bgcolor='#fff'>\n<center><h1>404 Not Found</h1></center>\n<hr><center>" . $sys[0] . "</center>\n</body>\n</html>";
    echo $c404;
    exit;
}
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:9,代码来源:core.function.php

示例5: array

 $temparr = array('forward' => rawurlencode($forward));
 if ($mode == 'js') {
     js_write(template(empty($curuser->info['mid']) ? 'jslogin' : 'jsloginok', $temparr));
     mexit();
 } else {
     if ($enable_pptin && !empty($pptin_url) && $pptin_login) {
         $url = $pptin_url . $pptin_login;
         $url .= (strpos($url, '?') ? '&' : '?') . "{$getval}=" . rawurlencode($forward);
         header('location:' . $url);
         exit;
     }
     if (empty($_sys) && ($html = template('login', $temparr))) {
         mexit($html);
     } else {
         include_once M_ROOT . "./include/cheader.inc.php";
         _header(lang('memberlogin'));
         $cookiedef = '1m';
         $cookiearr = array('0' => lang('inbrowser'), '1h' => '1' . lang('hours'), '1d' => '1' . lang('days'), '1w' => '1' . lang('weeks'), '1m' => '1' . lang('month'), '-1' => lang('saveforever'));
         echo '<form name="cmslogin" id="cmslogin" method="post" action="?forward=' . rawurlencode($forward) . ($infloat ? "&infloat={$infloat}&handlekey={$handlekey}" : '') . '" onsubmit="return checklogin(this)">';
         tabheader_e();
         echo '<tr class="header"><td colspan="2"><b>' . lang('memberlogin') . '&nbsp; &nbsp; >><a href="tools/lostpwd.php"' . (empty($infloat) ? '' : " onclick=\"return floatwin('open_{$handlekey}',this)\"") . '>' . lang('getpwd') . '</a></b></td></tr>';
         trbasic(lang('membercname'), 'username');
         trbasic(lang('loginpwd'), 'password', '', 'password');
         tr_regcode('login');
         trbasic('Cookie', 'expires', makeoption($cookiearr, $cookiedef), 'select');
         trhidden('client_t', '');
         $infloat && trhidden('infloat', 1);
         tabfooter('cmslogin', lang('login'));
         mexit('</div></body></html>');
     }
 }
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:login.php

示例6: dirname

 */
require_once dirname(__FILE__) . '/config.php';
require_once iPATH . 'include/member.class.php';
switch ($_GET['do']) {
    case 'register':
        $iCMS->assign('config', array('seccode' => $iCMS->config['userseccode']));
        $iCMS->assign('forward', __REF__);
        $iCMS->iPrint("usercp/register.htm", "register");
        break;
    case 'agreement':
        $iCMS->assign('config', array('agreement' => str_replace("\n", "<br />", $iCMS->config['agreement'])));
        $iCMS->iPrint("usercp/agreement.htm", "agreement");
        break;
    case 'login':
        if (member::checklogin(true)) {
            _header($iCMS->config['usercpURL']);
        }
        $iCMS->assign('config', array('seccode' => $iCMS->config['userseccode']));
        $iCMS->assign('forward', __REF__);
        $iCMS->iPrint("usercp/login.htm", "login");
        break;
    case 'logout':
        member::cleancookie();
        break;
    default:
        require_once iPATH . 'include/UI.class.php';
        $action = $_POST['action'];
        //$forward= $_POST['forward'];
        if ($action == 'register') {
            ckseccode($_POST['seccode'], 'U') && javascript::json('seccode', 'error:seccode');
            $username = dhtmlspecialchars($_POST['username']);
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:31,代码来源:passport.php

示例7: _aenter

         _aenter($_da, 1);
         @extract($btags);
         extract($_da, EXTR_OVERWRITE);
         tpl_refresh($tplname);
         @(include M_ROOT . "template/{$templatedir}/pcache/{$tplname}.php");
         $_content = ob_get_contents();
         ob_clean();
         mexit($_content);
     }
 } else {
     load_cache('mlfields');
     include_once M_ROOT . "./include/fields.cls.php";
     include_once M_ROOT . "./include/upload.cls.php";
     include_once M_ROOT . "./include/cheader.inc.php";
     include_once M_ROOT . "./include/mcuedit.cls.php";
     $inajax ? aheader() : _header();
     if (!empty($mcommu['setting']['norepeat']) && ($cid = $db->result_one("SELECT cid FROM {$tblprefix}mflinks WHERE mid='{$mid}' AND fromid='{$memberid}' ORDER BY cid"))) {
         mcmessage('dorepeataddflink', axaction(2, M_REFERER));
     }
     $db->query("INSERT INTO {$tblprefix}mflinks SET\n\t\t\tmid='{$mid}',\n\t\t\tmname='" . $actuser->info['mname'] . "',\n\t\t\tfromid='{$memberid}',\n\t\t\tfromname='" . $curuser->info['mname'] . "',\n\t\t\tcreatedate='{$timestamp}'\n\t\t\t");
     if ($cid = $db->insert_id()) {
         $uedit = new cls_mcuedit();
         $uedit->read($cid, 'flink');
         foreach (array('fields') as $var) {
             ${$var} =& $uedit->{$var};
         }
         $c_upload = new cls_upload();
         $fields = fields_order($fields);
         $a_field = new cls_field();
         foreach ($fields as $k => $v) {
             if (!$v['isfunc'] && !$v['isadmin']) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:flink.php

示例8: main

 public function main()
 {
     global $_G;
     $aid = $_GET['aid'] ? $_GET['aid'] : get_goods_id($_GET['itemid']);
     if ($aid && $aid < 1) {
         msg('抱歉ID不存在');
     }
     if ($_GET['aid']) {
         $aid = intval($aid);
         $goods = D(array('and' => "aid = " . $aid, 'limit' => 1, 'all' => true, 'key' => 'goods_' . $aid));
     } else {
         $goods = D(array('and' => "num_iid = '{$aid}'", 'limit' => 1, 'all' => true, 'key' => 'goods_' . $aid));
     }
     if ($goods['status'] == 0 || $goods['status'] == 2) {
         msg('抱歉,当前商品 ' . $goods[status_text] . ' 暂时无法查看');
     }
     if ($_G[mobile]) {
         $url = URL . 'a=go_pay&num_iid=' . $goods[num_iid];
         _header("Location:" . $url);
     }
     $update = array();
     if ($goods['aid'] > 0) {
         if (!$goods[keywords]) {
             $keyword = get_keywords($goods['title'] . $goods['ly']);
             if ($keyword) {
                 $goods[keywords] = $keyword;
                 $update[keywords] = $keyword;
             }
         }
     }
     if ($goods['fid']) {
         $channel = $_G['all_channel']['k' . $goods[fid]];
     }
     $tpl = '';
     if ($channel) {
         $tpl = trim($channel['goods_tpl']);
     }
     $_G['channel'] = $channel;
     if ($goods[fid]) {
         $_G[fid] = $goods[fid];
     }
     if ($_G['setting']['get_message'] && !$goods['message']) {
         $message = top('m_taobao', 'get_message', $goods[num_iid]);
         if ($message) {
             $goods['message'] = $message;
             $update['message'] = $message;
         }
     }
     $up = D(array('and' => ' AND aid <' . $goods['aid'], 'table' => 'goods', 'order' => 'aid DESC'));
     $down = D(array('and' => ' AND aid >' . $goods['aid'], 'table' => 'goods', 'order' => 'aid ASC'));
     $goods[up] = $up[id] ? '<a href="' . $up[id_url] . '">' . $up[title] . '</a>' : '没有了';
     $goods[down] = $down[id] ? '<a href="' . $down[id_url] . '">' . $down[title] . '</a>' : '没有了';
     $this->add(array('goods' => $goods, 'up' => $up, 'down' => $down));
     if ($goods['aid'] > 0 && $update) {
         $update[views] = $goods['views'] + 1;
         DB::update('goods', $update, 'aid=' . $goods['aid']);
     }
     save_history(__CLASS__, $goods['aid']);
     $title = $goods['seo_title'] ? $goods['seo_title'] : $goods['title'];
     seo($title, $goods['keywords'], $goods['description']);
     $this->show($tpl);
 }
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:62,代码来源:goods.action.php

示例9: _setcookie

function _setcookie($name, $value = null, $expire = null, $path = null, $domain = null, $secure = null, $httponly = null)
{
    global $SERVER;
    $out = @setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
    if ($out === false) {
        // TODO: Handle $domain, $secure and $httponly
        if (!($expire > 0)) {
            $expire = time() + 60 * 60 * 24;
        }
        // 1 day default cookie duration
        $datetime = new DateTime(date("Y-m-d H:i:s", $expire));
        $cookie_time = $datetime->format(DATE_COOKIE);
        if ($path == null) {
            $path = "/";
        }
        if ($domain == null) {
            $domain = $SERVER['domain'];
        }
        $ret .= "Set-Cookie: " . urlencode($name) . "=" . urlencode($value) . "; expires=" . $cookie_time . "; path=" . $path . "; domain=" . $domain . ";";
        _header($ret);
        return true;
    } else {
        return true;
    }
}
开发者ID:simonfoxe,项目名称:PHP-DAVE-API,代码行数:25,代码来源:script_runner.php

示例10: empty

<?php

/**
 * @package iCMS V3.1
 * @copyright 2007-2009, iDreamSoft
 * @license http://www.idreamsoft.cn iDreamSoft
 * @author coolmoo <idreamsoft@qq.com>
 */
require_once "global.php";
empty($_GET['id']) && exit;
$iCMS->db->query("UPDATE `#iCMS@__article` SET hits=hits+1 WHERE `id` ='" . (int) $_GET['id'] . "' LIMIT 1");
_header(urldecode($_GET['url']));
开发者ID:jonycookie,项目名称:projectm2,代码行数:12,代码来源:link.php

示例11: _footer

						<td colspan="2" align="center"><input type="submit" /></td>
					</tr>
				<table>
			</form>
		</div>
	<?php 
    echo _footer();
    // Create new user, after submiting the form
} elseif ($_GET['act'] == 'createNewUser') {
    $dbControlHandler = new SQLiteDatabase(DB_CONTROL_FILE);
    // Create Users Table
    $dbControlHandler->query("CREATE TABLE users(id INTEGER PRIMARY KEY, username CHAR(60), salt CHAR(10), password CHAR(32), permissions INTEGER);");
    $userName = $_POST['userName'];
    $userPw = $_POST['password'];
    addNewUser($dbControlHandler, $userName, $userPw, GLOBAL_ADMIN);
    $dbTrackHandler = new SQLiteDatabase(DB_TRACK_FILE);
    // Create Tracking Table
    $dbTrackHandler->query("BEGIN;\r\n\t\tCREATE TABLE computers(id INTEGER PRIMARY KEY, name CHAR(250), region INTEGER, x INTEGER, y INTEGER, comment INTEGER, icon CHAR(150), laststatus INTEGER, lastsignal INTEGER);\r\n\t\tCREATE TABLE miscrecords(id INTEGER PRIMARY KEY, name CHAR(250), timestamp INTEGER, recordtype INTEGER, data TEXT);\r\n\t\tCREATE TABLE trackrecords(id INTEGER PRIMARY KEY, name CHAR(250), time INTEGER, status INTEGER);\r\nCREATE TABLE zones(id INTEGER PRIMARY KEY, region_name CHAR(255), region_width INTEGER, region_height INTEGER, region_map_img CHAR(255));\r\n\t\tCOMMIT;");
    echo _header(_('New Database Setup'));
    ?>
		<div id="yui-main">
			<h1>Database Creation Completed!</h1>
			<div>
				<p>The Database Creation Process is completed. Please login to your root account!</p>
			</div>
		</div>
	<?php 
    echo _footer();
} else {
    die('Not Implemented!');
}
开发者ID:htruong,项目名称:geniemon,代码行数:31,代码来源:setup.php

示例12: run

 static function run()
 {
     global $_G;
     $m = 'index';
     $a = 'main';
     if (CURSCRIPT == 'main') {
         $m = 'index';
     } elseif ($_GET['m']) {
         $m = trim($_GET['m']);
     } elseif (isset($_GET['fid']) && $_GET['fid'] > 0) {
         $m = 'channel';
     } elseif (isset($_GET['aid']) && $_GET['aid'] > 0 || isset($_GET['itemid']) && $_GET['itemid'] > 0) {
         $m = 'goods';
     } else {
         $m = defined('IN_ADMIN') ? 'admin' : 'index';
     }
     $a = $_GET['a'] ? $_GET['a'] : 'main';
     if (!preg_match("/^[a-z_]+\$/is", $m)) {
         system_error('system', 'Module String Error');
         return false;
     }
     if (!preg_match("/^[a-z_]+\$/is", $a)) {
         system_error('system', 'Action String Error');
     }
     if (defined('IN_ADMIN') && !$_G[uid]) {
         login();
     }
     $jump_url = '';
     if (defined('IN_ADMIN')) {
         include libfile('config/admin');
         $group = $_G['group'][$_G['member']['groupid']];
         foreach ($menu as $k => $v) {
             $menu[$k]['select'] = 0;
             if (array_key_exists($k, $group[power]) || $_G['adminid'] == 1) {
                 $menu[$k]['select'] = 1;
             }
             foreach ($v['nav'] as $k1 => $v1) {
                 if (array_key_exists($v1['a'], $group[power][$k]) || $_G['member']['groupid'] == 1) {
                     $menu[$k]['nav'][$k1]['select'] = 1;
                     $menu[$k]['select'] = 1;
                     if (!$jump_url) {
                         $jump_url = 'm=' . $k . '&a=' . $v1['a'];
                     }
                 } else {
                     $menu[$k]['nav'][$k1]['select'] = 0;
                 }
             }
         }
         $_G['menu'] = $menu;
         seo('uz-system 后台管理          power by uz-system.com');
         include_once ROOT_PATH . "inc/admin_action/" . $m . ".action.php";
     } else {
         include_once libfile("action/" . $m);
     }
     if ($m == 'list') {
         $mm = '_' . $m;
         if (!class_exists($mm)) {
             system_error('system', 'Module not exists');
         }
         $class = new $mm();
     } else {
         if (!class_exists($m)) {
             system_error('system', 'Module not exists');
         }
         $class = new $m();
     }
     define('CURMODULE', $m);
     if (defined('IN_ADMIN') && $_G[uid] && $_G[member][groupid] != 1) {
         $group = $_G['group'][$_G['member']['groupid']];
         $gid = $_G['member']['groupid'];
         $power = $_G['group'][$gid]['power'];
         $power['login']['logout'] = 1;
         //验证登录进后入台权限
         if ($_G[group][$gid]['login_admin'] != 1) {
             logout();
             _header("Location:" . CURSCRIPT . ".php");
             //system_error('system','您当前用户组无权进入后台');
         }
         //验证后台模块权限
         if (!$power[$m]) {
             if ($m == 'admin' && $a == 'main' && $_G['member']['groupid'] != 1 && $jump_url) {
                 header("Location:" . URL . $jump_url);
                 echo '<script type="text/javascript">window.location.href = "' . URL . $jump_url . '";</script>';
                 exit;
             } else {
                 cpmsg('当前模块您无法进行操作', 'errr', $jump_url);
             }
         }
         if ($a == 'del' && $power[$m]['post'] == 1) {
         } else {
             if ($power[$m][$a] != 1) {
                 cpmsg('当前模块分类您无法进行操作', 'errr', $jump_url);
             }
         }
     }
     if ($a == 'list') {
         $a = '_list';
     }
     if (method_exists($class, $a)) {
         if ($a == '_list') {
//.........这里部分代码省略.........
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:101,代码来源:application.class.php

示例13: _fiche

function _fiche(&$PDOdb, &$dispatch)
{
    global $db, $conf, $langs;
    llxHeader();
    $form = new TFormCore('auto', 'asset', 'post');
    echo $form->hidden('action', 'save');
    echo $form->hidden('id', $dispatch->fk_object);
    echo $form->hidden('type_object', $dispatch->type_object);
    $object = _header($dispatch->fk_object, $dispatch->type_object);
    $pListe[0] = "Sélectionnez une ligne";
    foreach ($object->lines as $k => &$line) {
        $label = !empty($line->label) ? $line->label : $line->libelle;
        if (empty($label) && !empty($line->desc)) {
            $label = $line->desc;
        }
        $pListe[$line->id] = $k + 1 . '/ ' . $label;
    }
    print count($dispatch->TDispatchAsset) . ' équipement(s) lié(s)<br />';
    ?>
	<table width="100%" class="border">
		<tr class="liste_titre">
			<?php 
    if (GETPOST('type_object') !== 'ticketsup') {
        print '<td>Ligne concernée</td>';
    }
    ?>
			<td>Equipement</td>
			<?php 
    if (!empty($conf->global->USE_LOT_IN_OF)) {
        ?>
<td>Numéro de Lot</td><?php 
    }
    print '<td>DLUO</td>';
    ?>
			<?php 
    if ($conf->global->clinomadic->enabled) {
        ?>
				<td>IMEI</td>
				<td>Firmware</td>
				<?php 
    }
    ?>
			<td>&nbsp;</td>
		</tr>
		
	<?php 
    foreach ($dispatch->TDispatchAsset as $k => &$da) {
        if ($da->to_delete) {
            continue;
        }
        $class = $class == 'pair' ? 'impair' : 'pair';
        ?>
<tr class="<?php 
        echo $class;
        ?>
">
			<?php 
        if (GETPOST('type_object') !== 'ticketsup') {
            echo '<td>' . $pListe[$da->fk_object] . '</td>';
        }
        ?>
			<td><?php 
        echo $da->asset->getNomUrl(1, 0, 1);
        ?>
</td>
			<td><?php 
        echo $da->asset->lot_number;
        ?>
</td>
			<?php 
        if (!empty($conf->global->USE_LOT_IN_OF)) {
            ?>
<td><?php 
            echo $da->asset->dluo ? dol_print_date($da->asset->dluo) : 'N/A';
            ?>
</td><?php 
        }
        ?>
			
			
			
			<?php 
        if ($conf->global->clinomadic->enabled) {
            ?>
				<td>IMEI</td>
				<td>Firmware</td>
				<?php 
        }
        ?>
			<td><?php 
        if ($object->statut == 0 || $type_object == 'contrat') {
            echo '<a href="?action=delete-line&k=' . $k . '&id=' . $object->id . '&type_object=' . $dispatch->type_object . '">' . img_delete() . '</a>';
        }
        ?>
</td>
		</tr>
		
		<?php 
    }
    $formproduct = new FormProduct($db);
//.........这里部分代码省略.........
开发者ID:ATM-Consulting,项目名称:dolibarr_module_dispatch,代码行数:101,代码来源:asset.php

示例14: _footer

  
  </script>
  </div>
DIVMAP;
    echo _footer();
    die;
}
// If this is a request, then construct
// the SQL command.
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $retCacheId = generateStats($_POST);
    header("location: generate-report.php?cache_id={$retCacheId}");
    die;
}
// else, please display the request form.
echo _header("Statistics Generation");
echo <<<DIVMAP
<div id="yui-main">
\t<h2>Report Set-up</h2>
\t
\t<form action="generate-report.php" method="post">
\t<p>
\tPlease generate the report named 
\t\t<input id="reportName" name="reportName" value="Genie"> <br /> <br />
\t\t
\tabout
\t\t<select id="reportType" name="reportType">
\t\t  <option value="computerStats">Computer Availability</option>
\t\t  <option value="programUsage">Program Usage</option>
\t\t</select> <br /> <br />
\t\t
开发者ID:htruong,项目名称:geniemon,代码行数:30,代码来源:generate-report.php

示例15: doextractpic

 function doextractpic()
 {
     Admin::MP("menu_extract_pic");
     include iPATH . 'include/forum.class.php';
     set_time_limit(0);
     $speed = 100;
     //提取速度
     $action = $this->PG('action');
     $fids = $this->PG('fid');
     $startid = (int) $this->PG('startid');
     $endid = (int) $this->PG('endid');
     $starttime = $this->PG('starttime');
     $endtime = $this->PG('endtime');
     $totle = isset($_GET['totle']) ? $_GET['totle'] : 0;
     $loop = isset($_GET['loop']) ? $_GET['loop'] : 1;
     $i = isset($_GET['i']) ? $_GET['i'] : 0;
     empty($action) && javascript::alert("请选择操作项");
     if ($fids) {
         empty($fids) && javascript::alert("请选择版块");
         is_array($fids) && ($fids = implode(",", $fids));
         if (strstr($fids, 'all')) {
             $forum = new forum();
             $fids = substr($forum->fid(), 0, -1);
             if (empty($fids)) {
                 javascript::dialog("提取完毕", 'url:' . __SELF__ . '?mo=files&do=extract');
             } else {
                 _header(__SELF__ . '?mo=files&do=extractpic&fid=' . $fids . '&action=' . $action);
             }
         } else {
             $cArray = explode(',', $fids);
             $_Ccount = count($cArray);
             $k = isset($_GET['k']) ? $_GET['k'] : 0;
             $rs = iCMS_DB::getArray("SELECT id FROM #iCMS@__article WHERE fid in ({$fids}) and `status`='1'");
             empty($totle) && ($totle = count($rs));
             $tloop = ceil($totle / $speed);
             if ($loop <= $tloop) {
                 $max = $i + $speed > $totle ? $totle : $i + $speed;
                 for ($j = $i; $j < $max; $j++) {
                     if ($action == "thumb") {
                         if ($this->extractThumb($rs[$j]['id'])) {
                             $msg .= "文章ID:" . $rs[$j]['id'] . "提取…<span style='color:green;'>√</span><br />";
                         }
                     } elseif ($action == "into") {
                         $intoMsg = $this->into($rs[$j]['id']);
                         if ($intoMsg) {
                             $msg .= $intoMsg . "文章ID:" . $rs[$j]['id'] . "提取…<span style='color:green;'>√</span><br />";
                         }
                     }
                 }
                 javascript::dialog($msg ? $msg : "暂无提取信息!", 'src:' . __SELF__ . '?mo=files&do=extractpic&fid=' . $fids . '&totle=' . $totle . '&loop=' . ($loop + 1) . '&i=' . $j . '&action=' . $action);
             } else {
                 javascript::dialog("提取完毕", 'url:' . __SELF__ . '?mo=files&do=extract');
             }
         }
     } elseif ($startid && $endid) {
         $startid > $endid && !isset($_GET['g']) && javascript::alert("开始ID不能大于结束ID");
         empty($totle) && ($totle = $endid - $startid + 1);
         empty($i) && ($i = $startid);
         $tloop = ceil($totle / $speed);
         if ($loop <= $tloop) {
             $max = $i + $speed > $endid ? $endid : $i + $speed;
             for ($j = $i; $j <= $max; $j++) {
                 if ($action == "thumb") {
                     if ($this->extractThumb($j)) {
                         $msg .= "文章ID:" . $j . "提取…<span style='color:green;'>√</span><br />";
                     }
                 } elseif ($action == "into") {
                     $intoMsg = $this->into($j);
                     if ($intoMsg) {
                         $msg .= $intoMsg . "文章ID:" . $j . "提取…<span style='color:green;'>√</span><br />";
                     }
                 }
             }
             javascript::dialog($msg ? $msg : "暂无提取信息!", 'src:' . __SELF__ . '?mo=files&do=extractpic&startid=' . $startid . '&endid=' . $endid . '&g&loop=' . ($loop + 1) . '&i=' . $j . '&action=' . $action);
         } else {
             javascript::dialog("提取完毕", 'url:' . __SELF__ . '?mo=files&do=extract');
         }
     } elseif ($starttime) {
         $s = strtotime($starttime);
         $e = empty($endtime) ? time() + 86400 : strtotime($endtime);
         $rs = iCMS_DB::getArray("SELECT id FROM #iCMS@__article WHERE `pubdate`>='{$s}' and `pubdate`<='{$e}' and `status`='1'");
         empty($totle) && ($totle = count($rs));
         $tloop = ceil($totle / $speed);
         if ($loop <= $tloop) {
             $max = $i + $speed > $totle ? $totle : $i + $speed;
             for ($j = $i; $j < $max; $j++) {
                 if ($action == "thumb") {
                     if ($this->extractThumb($rs[$j]['id'])) {
                         $msg .= "文章ID:" . $rs[$j]['id'] . "提取…<span style='color:green;'>√</span><br />";
                     }
                 } elseif ($action == "into") {
                     $intoMsg = $this->into($rs[$j]['id']);
                     if ($intoMsg) {
                         $msg .= $intoMsg . "文章ID:" . $rs[$j]['id'] . "提取…<span style='color:green;'>√</span><br />";
                     }
                 }
             }
             javascript::dialog($msg ? $msg : "暂无提取信息!", 'src:' . __SELF__ . '?mo=files&do=extractpic&starttime=' . $starttime . '&endtime=' . $endtime . '&totle=' . $totle . '&loop=' . ($loop + 1) . '&i=' . $j . '&action=' . $action);
         } else {
             javascript::dialog("提取完毕", 'url:' . __SELF__ . '?mo=files&do=extract');
//.........这里部分代码省略.........
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:101,代码来源:files.mo.php


注:本文中的_header函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。