本文整理汇总了PHP中index函数的典型用法代码示例。如果您正苦于以下问题:PHP index函数的具体用法?PHP index怎么用?PHP index使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了index函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: nav
function nav()
{
unset($_SESSION['index_class']);
unset($_SESSION['editmix_class']);
unset($_SESSION['validate_class']);
unset($_SESSION['makemix_class']);
unset($_SESSION['mwbedocs_class']);
unset($_SESSION['upfiles_class']);
if ($_SESSION['action'] == "index") {
index();
} elseif ($_SESSION['action'] == "makemix") {
makemix();
} elseif ($_SESSION['action'] == "upfiles") {
upfiles();
} elseif ($_SESSION['action'] == "verify") {
verify();
} elseif ($_SESSION['action'] == "validate") {
validate();
} elseif ($_SESSION['action'] == "editmix") {
editmix();
} elseif ($_SESSION['action'] == "mwbedocs") {
mwbedocs();
} elseif ($_SESSION['action'] == "delmix") {
delmix();
} else {
index();
}
}
开发者ID:romeosidvicious,项目名称:MixWidget-Back-End,代码行数:28,代码来源:functions.php
示例2: checkEntityFieldIntegrity
public function checkEntityFieldIntegrity($entityName, $entityFieldName, $testValue)
{
$castFunction = $this->model[$entityName]["definition"][$entityFieldName]["cast"];
$check = $this->model[$entityName]["definition"][$entityFieldName]["check"]($testValue, $castFunction);
if ($entityFieldName == "user_id") {
index($this->model[$entityName]["definition"]);
}
return $check;
}
开发者ID:benjaminchazelle,项目名称:StarWarsMarket,代码行数:9,代码来源:datamodel.class.php
示例3: connexion
function connexion()
{
if (!User::isConnected()) {
include VIEW . "connexion.php";
if (isset($_POST['login'])) {
echo "<p id='mErreur'>Mot de passe ou login erroné</p>";
}
} else {
index();
}
}
开发者ID:fauvet,项目名称:GESCABMED,代码行数:11,代码来源:accueil.php
示例4: show
public function show($id = null)
{
if (is_null($id)) {
return index();
} else {
$tags = User::find(Auth::user()->id)->tags()->where('tags.id', '=', $id)->first();
if (is_null($tags)) {
return PaperworkHelpers::apiResponse(PaperworkHelpers::STATUS_NOTFOUND, array());
} else {
return PaperworkHelpers::apiResponse(PaperworkHelpers::STATUS_SUCCESS, $tags);
}
}
}
开发者ID:netesheng,项目名称:paperwork,代码行数:13,代码来源:ApiTagsController.php
示例5: handle
function handle()
{
header('Content-Type: text/html');
$base = urldecode($_SERVER['REQUEST_URI']);
if ($base == '/Biblisches/Grundtext/') {
index();
return;
}
if (preg_match('/([^-]+)-(\\d+)/', $_GET['v'], $matched)) {
chapter($matched[1], $matched[2]);
return;
}
print "404. " . link_kapitel_auswahl();
}
开发者ID:ReneNyffenegger,项目名称:Bible-Text-Sources,代码行数:14,代码来源:handler.php
示例6: show
public function show($id = null)
{
if (is_null($id)) {
return index();
} else {
$shortcuts = DB::table('notebooks')->join('shortcuts', function ($join) {
$join->on('notebooks.id', '=', 'shortcuts.notebook_id')->where('shortcuts.user_id', '=', Auth::user()->id);
})->select('notebooks.id', 'notebooks.parent_id', 'notebooks.type', 'notebooks.title', 'shortcuts.id', 'shortcuts.sortkey')->where('notebooks.id', '=', $id)->first();
if (is_null($shortcuts)) {
return PaperworkHelpers::apiResponse(PaperworkHelpers::STATUS_NOTFOUND, array());
} else {
return PaperworkHelpers::apiResponse(PaperworkHelpers::STATUS_SUCCESS, $shortcuts);
}
}
}
开发者ID:Liongold,项目名称:paperwork,代码行数:15,代码来源:ApiShortcutsController.php
示例7: init
function init($conexao)
{
if (isset($_POST['acao'])) {
switch ($_POST['acao']) {
case 'add':
adicionar($conexao);
break;
case 'edit':
editar($conexao);
break;
case 'delete':
remover($conexao);
break;
}
} else {
index($conexao);
}
}
开发者ID:ram0nc,项目名称:dead,代码行数:18,代码来源:curso-controller.php
示例8: do_upload
function do_upload()
{
include "classes/Upload.php";
$config['upload_path'] = './uploads/';
// $config['allowed_types'] = '';
$config['max_size'] = '100';
$UpFile = new Upload($config);
if (!$UpFile->do_upload()) {
echo "<span style='color:#ff0000;'>Se ha producido un error</span>";
index();
} else {
$dataFile = $UpFile->data();
$file = 'uploads/' . $dataFile['file_name'];
$pass = $_POST['pass'];
//$output = system('./revtrans.php --password='.$pass.' '.$file);
//printf("System Outputs: $output\n");
exec('./revtrans.php --password=' . $pass . ' ' . $file, $results);
//parser mejorable pero bueno
$results = implode($results);
$results = str_replace('""', '#', $results);
$results = str_replace(',', '#', $results);
$results = str_replace('"', '', $results);
$results = preg_split("/#/", $results);
$i = 0;
$aux = 0;
$Keys = array();
foreach ($results as $result) {
$Keys[$aux][] = $result;
$i++;
if ($i == 5) {
$i = 0;
$aux++;
}
}
//print_r($Keys);
$i = 0;
foreach ($Keys as $Key) {
if ($i != 0) {
echo $Key[0] . "=>" . $Key[2] . "<br>";
}
$i++;
}
}
}
开发者ID:robertorubioes,项目名称:WebRPM,代码行数:44,代码来源:index.php
示例9: popup_switch
function popup_switch()
{
switch ($_GET["main"]) {
case "index":
echo index();
break;
case "system":
echo section_system();
break;
case "mail":
echo section_messaging();
break;
case "proxy":
echo section_proxy();
break;
default:
break;
}
}
开发者ID:brucewu16899,项目名称:artica,代码行数:19,代码来源:statistics.index.php
示例10: rebuildThemes
rebuildThemes('boards');
header('Location: ?/' . $b['uri'] . '/' . $config['file_index'], true, $config['redirect_http']);
} else {
$body .= form_newBoard();
// TODO: Statistics, etc, in the dashboard.
echo Element('page.html', array('config' => $config, 'title' => 'New board', 'body' => $body, 'mod' => true));
}
} elseif (preg_match('/^\\/' . $regex['board'] . '(' . $regex['index'] . '|' . $regex['page'] . ')?$/', $query, $matches)) {
// Board index
$boardName =& $matches[1];
// Open board
if (!openBoard($boardName)) {
error($config['error']['noboard']);
}
$page_no = empty($matches[2]) || $matches[2] == $config['file_index'] ? 1 : $matches[2];
if (!($page = index($page_no, $mod))) {
error($config['error']['404']);
}
$page['pages'] = getPages(true);
$page['pages'][$page_no - 1]['selected'] = true;
$page['btn'] = getPageButtons($page['pages'], true);
$page['mod'] = true;
echo Element('index.html', $page);
} elseif (preg_match('/^\\/' . $regex['board'] . $regex['res'] . $regex['page'] . '$/', $query, $matches)) {
// View thread
$boardName =& $matches[1];
$thread =& $matches[2];
// Open board
if (!openBoard($boardName)) {
error($config['error']['noboard']);
}
开发者ID:niksfish,项目名称:Tinyboard,代码行数:31,代码来源:mod.php
示例11: usersMenus
include_once('ressources/class.templates.inc');
include_once('ressources/class.users.menus.inc');
include_once('ressources/class.maincf.multi.inc');
$users=new usersMenus();
if(!$users->AsPostfixAdministrator){
$tpl=new templates();
$ERROR_NO_PRIVS=$tpl->javascript_parse_text("{ERROR_NO_PRIVS}");
echo "alert('$ERROR_NO_PRIVS');";
die();
}
if(isset($_GET["popup"])){popup();exit;}
if(isset($_GET["index"])){index();exit;}
if(isset($_GET["settings"])){parameters();exit;}
if(isset($_GET["dnsbl"])){dnsbl();exit;}
if(isset($_GET["dnsbl-list"])){dnsbl_list();exit;}
if(isset($_GET["dnsbl-add"])){dnsbl_add();exit;}
if(isset($_GET["dnsbl-delete"])){dnsbl_delete();exit;}
if(isset($_GET["postscreen_dnsbl_action"])){saveConfig();exit;}
if(isset($_GET["postscreen_bare_newline_enable"])){saveConfig();exit;}
if(isset($_GET["EnablePostScreen"])){EnablePostScreen_edit();exit;}
js();
开发者ID:rsd,项目名称:artica-1.5,代码行数:29,代码来源:postscreen.php
示例12: fwrite
{
echo 'Successfully created<br />'."\n";
echo 'Go to BBS: <a href="../'.$_POST['bbs'].'/index.html">'.$_POST['title'].'</a><br />'."\n";
if(!file_exists('../'.$_POST['bbs'].'/')) mkdir('../'.$_POST['bbs'].'/',0777);
if(!file_exists('../'.$_POST['bbs'].'/.htaccess'))
{
$fp=fopen('../'.$_POST['bbs'].'/.htaccess','w');
fwrite($fp,'DirectoryIndex index.html');
fclose($fp);
}
require 'page_elements.php';
$fp=fopen("../".$_POST['bbs']."/index.html",'w');
fwrite($fp,head($bbs_name,$_POST['title']));
fwrite($fp,index_display($bbs_name,$_POST['title'],$bbs['display']));
fwrite($fp,index_menu($_POST['bbs'],$db_prefix,$menu_n,$index_n));
fwrite($fp,index($_POST['bbs'],$db_prefix,$index_posts_n,$index_n,$_POST['postname'],$_POST['show_id']));
fwrite($fp,form($_POST['bbs']));
fwrite($fp,$foot);
fclose($fp);
$fp=fopen("../".$_POST['bbs']."/subback.html",'w');
fwrite($fp,$head);
fwrite($fp,index_menu($_POST['bbs'],$db_prefix));
fwrite($fp,$foot);
fclose($fp);
}
}
?>
Create BBS:
<form action="?operate=bbs&action=create" method="post">
<table style="margin-left: auto; margin-right: auto; text-align: left;" border="1">
开发者ID:princessGasmask,项目名称:lucidtea,代码行数:31,代码来源:operate.php
示例13: buildIndex
function buildIndex($global_api = "yes")
{
global $board, $config, $build_pages;
if (!$config['smart_build']) {
$pages = getPages();
if (!$config['try_smarter']) {
$antibot = create_antibot($board['uri']);
}
if ($config['api']['enabled']) {
$api = new Api();
$catalog = array();
}
}
for ($page = 1; $page <= $config['max_pages']; $page++) {
$filename = $board['dir'] . ($page == 1 ? $config['file_index'] : sprintf($config['file_page'], $page));
$jsonFilename = $board['dir'] . ($page - 1) . '.json';
// pages should start from 0
if ((!$config['api']['enabled'] || $global_api == "skip" || $config['smart_build']) && $config['try_smarter'] && isset($build_pages) && !empty($build_pages) && !in_array($page, $build_pages)) {
continue;
}
if (!$config['smart_build']) {
$content = index($page);
if (!$content) {
break;
}
// json api
if ($config['api']['enabled']) {
$threads = $content['threads'];
$json = json_encode($api->translatePage($threads));
file_write($jsonFilename, $json);
$catalog[$page - 1] = $threads;
}
if ($config['api']['enabled'] && $global_api != "skip" && $config['try_smarter'] && isset($build_pages) && !empty($build_pages) && !in_array($page, $build_pages)) {
continue;
}
if ($config['try_smarter']) {
$antibot = create_antibot($board['uri'], 0 - $page);
$content['current_page'] = $page;
}
$antibot->reset();
$content['pages'] = $pages;
$content['pages'][$page - 1]['selected'] = true;
$content['btn'] = getPageButtons($content['pages']);
$content['antibot'] = $antibot;
file_write($filename, Element('index.html', $content));
} else {
file_unlink($filename);
file_unlink($jsonFilename);
}
}
if (!$config['smart_build'] && $page < $config['max_pages']) {
for (; $page <= $config['max_pages']; $page++) {
$filename = $board['dir'] . ($page == 1 ? $config['file_index'] : sprintf($config['file_page'], $page));
file_unlink($filename);
if ($config['api']['enabled']) {
$jsonFilename = $board['dir'] . ($page - 1) . '.json';
file_unlink($jsonFilename);
}
}
}
// json api catalog
if ($config['api']['enabled'] && $global_api != "skip") {
if ($config['smart_build']) {
$jsonFilename = $board['dir'] . 'catalog.json';
file_unlink($jsonFilename);
$jsonFilename = $board['dir'] . 'threads.json';
file_unlink($jsonFilename);
} else {
$json = json_encode($api->translateCatalog($catalog));
$jsonFilename = $board['dir'] . 'catalog.json';
file_write($jsonFilename, $json);
$json = json_encode($api->translateCatalog($catalog, true));
$jsonFilename = $board['dir'] . 'threads.json';
file_write($jsonFilename, $json);
}
}
if ($config['try_smarter']) {
$build_pages = array();
}
}
开发者ID:Cipherwraith,项目名称:infinity,代码行数:80,代码来源:functions.php
示例14: split
<?php
require_once "modules/index.php";
require_once "modules/game.php";
$query = $_SERVER['QUERY_STRING'];
$query = split("/", $query);
$module = array_shift($query);
$parameters = $query;
switch ($module) {
case "g":
//game
game($parameters);
break;
case "help":
//help functions
break;
default:
index($parameters);
}
开发者ID:heikkiket,项目名称:konquest-html5,代码行数:19,代码来源:index.php
示例15: main_switch
function main_switch()
{
switch ($_GET["main"]) {
case "index":
index();
exit;
break;
case "artica_process":
main_config();
exit;
break;
default:
break;
}
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:15,代码来源:artica.performances.php
示例16: deletecat
function deletecat()
{
//pour supprimer une catégorie (fonction appelée par le clic sur "supprimer" dans une ligne du formulaire)
global $deletecat, $keysommaire, $confirm, $catname, $db, $prefix;
if ($confirm != "YES") {
include "header.php";
GraphicAdmin();
echo "<br>";
OpenTable();
$catname = htmlspecialchars($catname);
echo "<div align=\"center\">" . _SOMWARNINGDELETECAT . " <i>{$catname}</i> ?<br><br>";
echo "[ <a href=\"admin.php?op=sommaire\">" . _SOMNO . "</a> | <a href=\"admin.php?op=sommaire&go=deletecat&deletecat={$deletecat}&confirm=YES\">" . _SOMYES . "</a> ]" . "</div>";
CloseTable();
include "footer.php";
} else {
$confirm = "NO";
$db->sql_query("DELETE FROM " . $prefix . "_sommaire WHERE groupmenu='{$deletecat}'");
$db->sql_query("DELETE FROM " . $prefix . "_sommaire_categories WHERE groupmenu='{$deletecat}'");
echo MySql_error();
index();
}
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:22,代码来源:sommaire.php
示例17: postfix_tls_switch
function postfix_tls_switch()
{
if ($_GET["tab"] == null) {
$_GET["tab"] = "tls_table";
}
switch ($_GET["tab"]) {
case "index":
echo index();
break;
case "tls_table":
echo smtp_tls_policy_maps();
break;
case "certificate_infos":
echo postfix_tls_certificate();
break;
case "settings":
echo postfix_tls_settings();
break;
case "relay_clientcerts":
echo postfix_relay_clientcerts();
break;
default:
echo smtp_tls_policy_maps($_GET["ou"]);
break;
}
}
开发者ID:brucewu16899,项目名称:artica,代码行数:26,代码来源:postfix.tls.php
示例18: session_start
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Videoclub</title>
<meta charset="utf-8" />
</head>
<body><?php
require 'auxiliar.php';
require '../comunes/auxiliar.php';
$columnas = array('numero' => array('bonito' => 'Número', 'criterio' => 'numero', 'exacto' => TRUE), 'dni' => array('bonito' => 'DNI', 'criterio' => 'dni', 'exacto' => TRUE), 'nombre' => array('bonito' => 'Nombre', 'criterio' => 'nombre'), 'direccion' => array('bonito' => 'Dirección', 'criterio' => 'direccion'), 'poblacion_nombre' => array('bonito' => 'Población', 'criterio' => 'poblacion_nombre'), 'provincia_nombre' => array('bonito' => 'Provincia', 'criterio' => 'provincia_nombre'), 'codpostal' => array('bonito' => 'Código postal', 'criterio' => 'codpostal', 'exacto' => TRUE), 'telefono' => array('bonito' => 'Teléfono', 'criterio' => 'telefono', 'exacto' => TRUE));
index($columnas, 'v_socios');
?>
</body>
</html>
开发者ID:rocasocrates,项目名称:video,代码行数:18,代码来源:index.php
示例19: array
$bot = array("bot", 7, 5, 3, 0, 6, 0);
if ($noun1[$n][2] == 0 && $noun1[$n][3] == 0) {
$say = array("Well I don't think being a ", "If I am just a ", "If I'm a ");
$say2 = array(" is the same as being alive.", " is alive, for starters.", " makes me competent enough to answer that question.", " makes me capable of answering that question.", " allows me to be able to answer that, but I'm a bot so I just did.");
$rand = rand(0, count($say) - 1);
$rand2 = rand(0, count($say2) - 1);
echo $say[$rand] . $noun1[$n][0] . $say2[$rand2];
} else {
if ($noun1[$n][2] < 0) {
$say = array("Thing is I am smarter than this ", "I got more smarts than this ", "I'm smarter than a ");
$say2 = array(" really I am", "I'm not stupid.", "I'm not dumb what do you take me for?", " so really what you take me for?", " by a long shot.");
$rand = rand(0, count($say) - 1);
$rand2 = rand(0, count($say2) - 1);
echo $say[$rand] . $noun1[$n][0] . $say2[$rand2];
} else {
if ((int) llList2String(bot, 6) > (int) index(noun1, i, 7, 6)) {
$say = array("But I'm prettier than a ", "Well what about you? are you prettier than a ", "I'm better-looking than a ");
$rand = rand(0, count($say) - 1);
echo $say[$rand] . $noun1[$n][0];
}
}
}
} else {
if ($noun1[$n][1] < -6) {
$bad = array();
array_push($bad, "Your love is a ");
array_push($bad, "In the evening the summer sun burns me like the ");
array_push($bad, "Eagles attack swiftly like most every ");
array_push($bad, "Madness is the quality of the ");
array_push($bad, "Pain and suffering come with every ");
array_push($bad, "That isn't good, that ");
开发者ID:Aranjedeath,项目名称:singularitrons_game,代码行数:31,代码来源:theABot.php
示例20: index
<div id="page-wrapper">
<div class="col-lg-12">
<h3 class="page-header">Cursos</h3>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>Nome</th>
<th>Descrição</th>
<th>Programa</th>
<th style="width: auto !important;"></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$cursos = index($conexao);
foreach ($cursos as $curso) {
?>
<tr>
<td><?php
echo $curso['NOME'];
?>
</td>
<td><?php
echo $curso['DESCRICAO'];
?>
</td>
<td><?php
echo $curso['PROGRAMA'];
?>
</td>
开发者ID:ram0nc,项目名称:dead,代码行数:31,代码来源:index.php
注:本文中的index函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论