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


PHP get_index函数代码示例

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


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

示例1: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->img_dir = "./data/upload/mall/";
     $this->assign('img_dir', $this->img_dir);
     $this->assign('cate_list', $this->_get_cate_list());
     $this->assign('index_list', get_index());
 }
开发者ID:kid2682,项目名称:SMZDM,代码行数:8,代码来源:mallAction.class.php

示例2: DELETE

function DELETE($api_noun)
{
    global $id, $storage;
    if ($id !== NULL) {
        $api = $GLOBALS['api']->{$api_noun};
        $data = get_api_data($api_noun);
        $index = get_index($data, $id);
        if ($index !== NULL) {
            array_splice($data, $index, 1);
            save_file($data);
            return "";
        } else {
            throw new Exception('Selected item does not exist.', 404);
        }
    }
    throw new Exception('DELETE method must specify which item to delete.', 404);
}
开发者ID:paylesworth,项目名称:Dirty-REST,代码行数:17,代码来源:index.php

示例3: foreach

            <h3>网站服务简介</h3>
              <div class="user_sroll">
              <!-- <ul class="user_list">
                <?php 
/*if(count($user)>0){
    foreach ($user as $key => $value) {
      echo ' <li>'.$value['kq_name'].'<span>刚刚注册了</span></li>';
    }
  }*/
?>
                
              </ul> -->
              <div class="guirze">
                <div id="scrollobj" class="gz_cont">
                <?php 
$zj = get_index($kq_openconfig['zj']);
echo $zj['kq_content'];
?>
                </div>
              </div>
              </div>
            </div>
         <!--    <div class="part part4">
           <img src="images/step.jpg" alt="">
         </div> -->
            
          </div>
        </div>
        <div class="clear_float"></div>
      </div>
      <div class="clear_float"></div>
开发者ID:kong-qi,项目名称:lexiu,代码行数:31,代码来源:show.php

示例4: substr

    $wordsToSend = substr($wordsToSend, 0, -1);
    return $wordsToSend;
}
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$words = "";
global $flag_q;
if (isset($_GET["q"])) {
    //check for quotes
    if (mb_substr($_GET["q"], 0, 1) == '"' && mb_substr($_GET["q"], -1) == '"') {
        $flag_q = true;
    }
    $index = get_index();
    $results = search_words($_GET["q"], $index);
    if ($flag_q) {
        $_GET["q"] = substr($_GET["q"], 1, -1);
    }
    $words = getWords($_GET["q"]);
}
?>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Search</title>
        <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
        <style>
开发者ID:benmarder,项目名称:SearchEngine,代码行数:31,代码来源:index.php

示例5: disable

 function disable()
 {
     global $set, $db, $apx;
     $_REQUEST['id'] = (int) $_REQUEST['id'];
     if (!$_REQUEST['id']) {
         die('missing ID!');
     }
     if ($_POST['send'] == 1) {
         if (!checkToken()) {
             printInvalidToken();
         } else {
             $db->query("UPDATE " . PRE . "_banner SET starttime='0',endtime='0' WHERE id='" . $_REQUEST['id'] . "' LIMIT 1");
             logit('BANNER_DISABLE', 'ID #' . $_REQUEST['id']);
             printJSRedirect(get_index('banner.show'));
         }
     } else {
         list($title) = $db->first("SELECT partner FROM " . PRE . "_banner WHERE id='" . $_REQUEST['id'] . "' LIMIT 1");
         $apx->tmpl->assign('MESSAGE', $apx->lang->get('MSG_TEXT', array('TITLE' => compatible_hsc($title))));
         tmessageOverlay('disable', array('ID' => $_REQUEST['id']));
     }
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:21,代码来源:admin.php

示例6: enable

 function enable()
 {
     global $set, $db, $apx;
     $_REQUEST['id'] = (int) $_REQUEST['id'];
     if (!$_REQUEST['id']) {
         die('missing ID!');
     }
     if ($_POST['send'] == 1) {
         $starttime = maketime(1);
         $endtime = maketime(2);
         if (!$endtime || $endtime <= $starttime) {
             $endtime = 3000000000;
         }
         $db->query("UPDATE " . PRE . "_poll SET starttime='" . $starttime . "',endtime='" . $endtime . "' WHERE ( id='" . $_REQUEST['id'] . "' ) LIMIT 1");
         logit('POLL_ENABLE', 'ID #' . $_REQUEST['id']);
         printJSRedirect(get_index('poll.show'));
     } else {
         list($title) = $db->first("SELECT question FROM " . PRE . "_poll WHERE id='" . $_REQUEST['id'] . "' LIMIT 1");
         $apx->tmpl->assign('ID', $_REQUEST['id']);
         $apx->tmpl->assign('TITLE', compatible_hsc($title));
         $apx->tmpl->assign('STARTTIME', choosetime(1, 0, time()));
         $apx->tmpl->assign('ENDTIME', choosetime(2, 1));
         tmessageOverlay('enable', $input);
     }
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:25,代码来源:admin.php

示例7: quicklink_index

function quicklink_index($action)
{
    global $quicklink_dump, $apx;
    if (!$apx->user->has_right($action)) {
        return;
    }
    $quicklink_dump .= iif($quicklink_dump, '<br />') . '&raquo; <a href="' . get_index($action) . '">' . $apx->lang->get('TITLE_' . strtoupper(str_replace('.', '_', $action))) . '</a>';
}
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:8,代码来源:functions.admin.php

示例8: get_index

          </div>

        </div><!-- gitf_warp -->
        </div>
      </div><!-- part -->
    </div>
      <div class="part part2">
        <div class="wm800">
          <div class="guize">
            <h3 class="h3">本期赠送礼品规则</h3>
            <div class="msg">
              <?php 
if ($show_r['kq_guize']) {
    echo $show_r['kq_guize'];
} else {
    $guize = get_index(6);
    echo $guize['kq_content'];
}
?>
             
            </div>
            <div class="balog">
              <dl>
                <dd>
                  <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
                  <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"32"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"24"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                </dd>
                <dd>
                  <?php 
if (isset($_COOKIE['user'])) {
    $username = is_login($_COOKIE['uid']);
开发者ID:kong-qi,项目名称:lexiu,代码行数:31,代码来源:gitf.php

示例9: catclean

 function catclean()
 {
     global $set, $db, $apx;
     $_REQUEST['id'] = (int) $_REQUEST['id'];
     if (!$_REQUEST['id']) {
         die('missing ID!');
     }
     if ($_POST['send'] == 1) {
         if ($_POST['delcat']) {
             $nodeInfo = $this->cat->getNode($_REQUEST['id']);
             if ($nodeInfo['children']) {
                 $_POST['delcat'] = 0;
             }
         }
         if (!checkToken()) {
             printInvalidToken();
         } elseif ($_POST['id'] && $_POST['moveto']) {
             $db->query("UPDATE " . PRE . "_videos SET catid='" . intval($_POST['moveto']) . "' WHERE catid='" . $_REQUEST['id'] . "'");
             logit('VIDEOS_CATCLEAN', "ID #" . $_REQUEST['id']);
             //Kategorie löschen
             if ($_POST['delcat']) {
                 $this->cat->deleteNode($_REQUEST['id']);
                 logit('VIDEOS_CATDEL', "ID #" . $_REQUEST['id']);
             }
             printJSRedirect(get_index('videos.catshow'));
             return;
         }
     }
     $data = $this->cat->getTree(array('title', 'open'));
     if (count($data)) {
         foreach ($data as $res) {
             if ($res['level']) {
                 $space = str_repeat('&nbsp;&nbsp;', $res['level'] - 1);
             }
             if ($res['id'] != $_REQUEST['id'] && $res['open']) {
                 $catlist .= '<option value="' . $res['id'] . '" ' . iif($_POST['moveto'] == $res['id'], ' selected="selected"') . ' style="color:green;">' . $space . replace($res['title']) . '</option>';
             } else {
                 $catlist .= '<option value="" disabled="disabled" style="color:grey;">' . $space . replace($res['title']) . '</option>';
             }
         }
     }
     list($title, $children) = $db->first("SELECT title,children FROM " . PRE . "_videos_cat WHERE id='" . $_REQUEST['id'] . "' LIMIT 1");
     $children = dash_unserialize($children);
     $apx->tmpl->assign('ID', $_REQUEST['id']);
     $apx->tmpl->assign('TITLE', compatible_hsc($title));
     $apx->tmpl->assign('DELCAT', (int) $_POST['delcat']);
     $apx->tmpl->assign('DELETEABLE', !$children);
     $apx->tmpl->assign('CATLIST', $catlist);
     tmessageOverlay('catclean');
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:50,代码来源:admin.php

示例10: var_dump

    var_dump(isset($a["foo"]));
    $q =& $a["foo"];
    var_dump(isset($a["foo"]));
    unset($q);
    var_dump(isset($a["foo"]));
}
f();
/*********/
function get_index()
{
    echo "I've made a huge mistake\n";
    return 0;
}
$a = 4;
$arr = array("get_index should not be called");
var_dump(isset($a, $b, $arr[get_index()]));
/**
 * Check for a peculiar translator interaction with IssetM, where
 * a dirty, variant local in the same BB as IssetM could cause the
 * local to morph into a cell.
 */
function g($dontTake, &$toFillIn, $id, $key, $value)
{
    $toFillIn = array();
    if (isset($toFillIn[$id])) {
        $cur = $toFillIn[$id];
    }
    $toFillIn[$id] = $value;
}
$a = null;
g(null, $a, "127.0.0.1", null, null);
开发者ID:badlamer,项目名称:hhvm,代码行数:31,代码来源:Isset.php

示例11: del

 function del()
 {
     global $set, $apx, $db;
     //Mehrere
     if (is_array($_REQUEST['multiid'])) {
         if (!checkToken()) {
             printInvalidToken();
         } else {
             foreach ($_REQUEST['multiid'] as $file) {
                 $file = $this->mm->securefile($file);
                 if ($this->mm->is_protected($file)) {
                     continue;
                 }
                 $this->mm->deletefile($file);
                 logit('MEDIAMANAGER_DEL', $file);
             }
             header("HTTP/1.1 301 Moved Permanently");
             header('Location: ' . get_index('mediamanager.index'));
         }
     } else {
         if (!$_REQUEST['file']) {
             die('missing file!');
         }
         if ($this->mm->is_protected($_REQUEST['file'])) {
             die('this file is protected!');
         }
         if ($_POST['send'] == 1) {
             if (!checkToken()) {
                 printInvalidToken();
             } else {
                 $this->mm->deletefile($_REQUEST['file']);
                 logit('MEDIAMANAGER_DEL', $_REQUEST['file']);
                 printJSRedirect(get_index('mediamanager.index'));
             }
         } else {
             $apx->tmpl->assign('MESSAGE', $apx->lang->get('MSG_TEXT', array('TITLE' => compatible_hsc($this->mm->getfile($_REQUEST['file'])))));
             tmessageOverlay('del', array('FILE' => $_REQUEST['file']));
         }
     }
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:40,代码来源:admin.php

示例12: get_docs_by_classpath

function get_docs_by_classpath($class, $classpath, $baseInfo)
{
    $title_detail_url_map = get_title_detail_map($class, $classpath);
    $index_url_map = get_index_url_map($class, $classpath);
    $docs = array();
    $path = "./data/" . $class;
    $file_list_of_class = $path . "/" . $classpath . ".log";
    $tmp = iconv("utf-8", "gb2312//IGNORE", $file_list_of_class);
    if (!file_exists($tmp)) {
        echo $file_list_of_class . " NOT FOUND\n";
        save("logs/detail_not_found.txt", $path . "\n", "a+");
        return $docs;
    }
    $fp = fopen($tmp, "r+");
    while ($line = readLine($fp)) {
        if (strlen($line) == 0) {
            continue;
        }
        $arr = explode("\t", $line);
        $doc = array();
        $doc = array_merge($doc, $baseInfo);
        $title = $doc['title'] = $arr[0];
        $doc['author'] = $arr[1];
        $doc['school'] = $arr[2];
        $doc['degree'] = $arr[3];
        $doc['year'] = $arr[4];
        $doc['read_url'] = $arr[5];
        $doc['abstract_302_url'] = $arr[6];
        $c = $doc['code'] = $arr[7];
        $doc['status'] = 0;
        $doc['_id'] = md5($c . $title);
        $doc['abstract_url'] = @$title_detail_url_map[$title];
        $doc = array_merge($doc, get_abstract_by_title($class, $classpath, $title));
        //$doc = array_merge($doc, get_index($class, $classpath, $title));
        $doc['index'] = get_index($class, $classpath, $title);
        $doc['index_url'] = isset($index_url_map[$title]) ? $index_url_map[$title] : "";
        $doc['ts'] = time();
        $docs[] = $doc;
    }
    fclose($fp);
    //exit;
    return $docs;
}
开发者ID:highestgoodlikewater,项目名称:cnkispider,代码行数:43,代码来源:job.php

示例13: foreach

$prev = "";
$i = -1;
$j = 0;
foreach ($lines as $line) {
    $col = explode("|", $line);
    if ($col[2] > 10) {
        #echo "<pre>"; print_r($col); echo "</pre>";
        if ($prev != $col[0]) {
            $prev = $col[0];
            $i++;
            $j = 0;
            for ($t = 0; $t < 40; $t++) {
                $datay[$i][$t] = 0;
            }
        }
        $datay[get_index($col[3])][$i] = $col[2];
        $datax[$i] = date("H:j", $col[0]);
        $j++;
    }
}
#echo "<pre>"; print_r($datay); echo "</pre>"; exit;
$graph = new Graph(800, 768, "auto");
$graph->SetShadow();
$graph->SetBackgroundGradient('#8e8e8e', '#e1e1e1');
// Use an integer X-scale
$graph->SetScale("textlin");
// Set title and subtitle
$graph->title->Set("Memory Leaks");
$graph->subtitle->Set("Shows the number of unfreed blocks requested by each module");
// Use built in font
$graph->title->SetFont(FF_FONT1, FS_BOLD);
开发者ID:chiranjeevjain,项目名称:agilebill,代码行数:31,代码来源:memory_report.inc.php

示例14: str_replace

     $user->pass = $newPass;
     if ($id != 0) {
         $user->img = $img;
     }
     $user['id'] = $id;
     if (write_xml('users', $users)) {
         echo "PASS||{$usern}||{$img}||{$id}";
     }
     break;
 case 'DEL_USER':
     if (check_login($_SESSION, $users) && $_SESSION['uid'] != 0) {
         echo 'FAIL||You do not have permission to delete users.';
         exit;
     }
     $id = str_replace($bad, '', $_REQUEST['id']);
     if (!($idx = get_index((int) $id, $users))) {
         echo 'FAIL||That user does not exist.';
         exit;
     }
     if ($id == 0) {
         echo 'FAIL||You cannot delete the master user once created. If you no longer want multi-user mode enabled, you can turn it off normally.';
         exit;
     }
     unset($users->user[$idx]);
     if (write_xml('users', $users)) {
         echo "PASS||{$id}";
     }
     break;
 case 'LOGOUT':
     session_unset();
     session_destroy();
开发者ID:Vmajalikar,项目名称:swirlyblue,代码行数:31,代码来源:ajax.php

示例15: Header

}
$domain = $_REQUEST['domain'];
$offset = $_REQUEST['offset'];
$max_results = $_REQUEST['max_results'];
$getext = $_REQUEST['getext'];
$ignoredir = $_REQUEST['ignoredir'];
// check to see whether we know the domain or not
if (!isset($domain)) {
    Header("Location: index.html");
    exit;
}
if (!isset($offset)) {
    $offset = 0;
}
$domain = str_replace("http://", "", $domain);
$index = get_index($domain);
get_links($index, $domain, $links);
if (sizeof($links) <= $offset || !sizeof($links)) {
    setcookie("phpsubmit_remembering", false, time() + 604800);
    Header("Location: noresults.html");
    exit;
}
?>

<!--
    PHPSubmit - A search engine submission script
    Copyright (C) 2000 Matt Wilson

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
开发者ID:soar-team,项目名称:kloxo,代码行数:31,代码来源:phpsubmit.php


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