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


PHP Main函数代码示例

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


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

示例1: die

                                    $htmlInterativas .= '<td class="td-col-jus">' . (trim(strip_tags(nl2br($alternativa->Explicacao))) != '' ? '<a href="javascript:void(0);" onclick="javascript:fntDetItem(\'j\', \'' . $contUnico . '\', \'' . $contAlt . '\');">@lng[Ver detalhes]</a>' : '') . '</td>';
                                    $htmlInterativas .= '<td class="td-col-compl">&nbsp;</td>';
                                    $htmlInterativas .= '</tr>';
                                    if (trim(strip_tags($alternativa->Explicacao)) != '') {
                                        if (!is_null($alternativa->Explicacao)) {
                                            $htmlInterativas .= '<tr style="display:none;" id="jus-' . $contUnico . '-' . $contAlt . '">';
                                            $htmlInterativas .= '<td colspan="5" class="apre-just"><div class="cont-just">' . $alternativa->Explicacao . '</div></td>';
                                            $htmlInterativas .= '</tr>';
                                        }
                                    }
                                    $contAlt++;
                                    $contUnico++;
                                }
                                $htmlInterativas .= '</table>';
                                $htmlInterativas .= '</div>';
                            } else {
                                die($fe->getErro() . ' alternativas grupo pergunta');
                            }
                            $htmlInterativas .= '<div class="espacador"></div>';
                        }
                    }
                } else {
                    $htmlInterativas = "Erro linha 122";
                }
            }
        }
    }
    echo Comuns::Idioma($htmlInterativas);
}
Main();
开发者ID:GoPlaceIn,项目名称:siacc,代码行数:30,代码来源:ajaxverificaacertos.php

示例2: GetSetVar

// *** Parameters ***
// *** Main ***
if ($_SESSION['_LevelID'] == 1) {
    $PMBID = GetSetVar('_pmbLoginPMBID');
} elseif ($_SESSION['_LevelID'] == 33) {
    $PMBID = $_SESSION['_Login'];
} else {
    die(ErrorMsg('Error', "Anda tidak berhak menjalankan modul ini."));
}
CekBolehAksesModul();
$oke = BolehAksesData($_SESSION['_Login']);
if ($oke) {
    $gel = GetaField('pmbperiod', "KodeID='" . KodeID . "' and NA", 'N', "PMBPeriodID");
    $gos = sqling($_REQUEST['gos']);
    if (empty($gos)) {
        Main($gel, $PMBID);
    } else {
        $gos($gel, $PMBID);
    }
}
// *** Functions ***
function Main($gel, $pmbid)
{
    $ButuhGanti = GetaField('pmb', 'PMBID', $pmbid, 'PasswordBaru');
    if ($ButuhGanti == 'Y') {
        CekGantiPassword($gel, $pmbid);
    } else {
        Edit(0, $gel, $pmbid);
    }
}
function CekBolehAksesModul()
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:31,代码来源:pmbisiform.php

示例3: Main

<?php

/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Entrypoint to dataset administration
 *
 * Copyright (c) 2008-2009 Sergey I. Sharybin <g.ulairi@gmail.com>
 *
 * This program can be distributed under the terms of the GNU GPL.
 * See the file COPYING.
 */
include '../../../globals.php';
include $DOCUMENT_ROOT . '/inc/include.php';
Main(dirname($PHP_SELF), false);
开发者ID:Nazg-Gul,项目名称:gate,代码行数:15,代码来源:index.php

示例4: Fatal

                    if (count($runs) != 2) {
                        Fatal("not enough run files for '{$files['0']}' (needed 2, got " . count($runs) . ")");
                    }
                    break;
                case 2:
                    // explicit run names given
                    $runs = array(LookupRun($files[0]), LookupRun($files[1]));
                    break;
                case 3:
                    // explicit run names, shortcut syntax
                    $runs = array(LookupRun("{$files['0']}.{$files['1']}"), LookupRun("{$files['0']}.{$files['2']}"));
                    break;
                default:
                    Fatal("invalid compare syntax (expected 1 to 3 args, got " . count($files) . ")");
            }
            sphTextReport(sphCompare($runs));
        } else {
            if ($mode == 'view') {
                if (count($files) != 1) {
                    Fatal("view command requires exactly one argument");
                }
                $run = LookupRun($files[0]);
                sphTextReport(sphCompare(array($run, $run)));
            } else {
                BenchPrintHelp($argv[0]);
            }
        }
    }
}
Main($argv);
exit(0);
开发者ID:hanbingtel,项目名称:Coreseek-Fix,代码行数:31,代码来源:bench.php

示例5: Main

<?php

Main($map);
function Main($map)
{
    $GLOBALS["goMap"] = ms_newMapObj("{$map}");
    //batas koordinat seluruh peta, untuk tool 'zoom all'
    $GLOBALS["gfMinX"] = (double) $GLOBALS["goMap"]->extent->minx;
    $GLOBALS["gfMinY"] = (double) $GLOBALS["goMap"]->extent->miny;
    $GLOBALS["gfMaxX"] = (double) $GLOBALS["goMap"]->extent->maxx;
    $GLOBALS["gfMaxY"] = (double) $GLOBALS["goMap"]->extent->maxy;
    //set nilai $aVars dengan nilai parameter URL
    if (sizeof($_POST) > 0) {
        $aVars = $_POST;
    } else {
        if (sizeof($_GET) > 0) {
            $aVars = $_GET;
        } else {
            $aVars = array();
        }
    }
    //tool navigasi default: zoom in
    $GLOBALS["gszCurrentTool"] = "ZOOM_IN";
    $GLOBALS["gShowQueryResults"] = FALSE;
    //proses parameter URL
    ProcessURLArray($aVars);
}
function DrawMap()
{
    //fungsi untuk menggambar peta
    if ($GLOBALS["gShowQueryResults"]) {
开发者ID:tugasgis,项目名称:GIS-PROJECT,代码行数:31,代码来源:mapscript.php

示例6: Main

<?php

/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Index page for publication
 *
 * Copyright (c) 2008-2009 Sergey I. Sharybin <g.ulairi@gmail.com>
 *
 * This program can be distributed under the terms of the GNU GPL.
 * See the file COPYING.
 */
include '../globals.php';
include $DOCUMENT_ROOT . '/inc/include.php';
$self = $PHP_SELF;
Main(dirname($PHP_SELF), true);
开发者ID:Nazg-Gul,项目名称:e-marsa,代码行数:16,代码来源:index.php

示例7: get

$Url_id = get('Url_id');
$sql = 'SELECT Codigo,Url_id,Estado
	FROM sys_usuarios WHERE  Url_id = "' . $Url_id . '" ';
$rg = rGT($conexDefsei, $sql);
$Codigo_empresa = $rg["Codigo"];
$Nom_BD = "eco_" . $Codigo_empresa;
$Servidor = "LOCALHOST";
$ConexionEmpresa = conexSis_Emp($Servidor, $Nom_BD);
if (get('ProformaCod') != '') {
    Main(get('ProformaCod'));
}
if (get('Comprar') != '') {
    Comprar(get('Comprar'), '');
}
/////////////////// PROCESOS///////////////////////////////////////
if (get('Main') != '') {
    Main(get('Main'));
}
if (get("Formulario") != "") {
    // esta condicion inicia cuando se procesa la info de un formulario
    ///////////////////////////////////////////
    if (get("TipoDato") == "archivo") {
        if (get("Formulario") == "Logo_Empresa") {
            Guarda_Archivo($Codigo_Usuario, $Codigo_Empresa);
        }
    }
    ////////////////////////////////////
    function p_interno($codigo, $campo)
    {
        global $FechaHora;
        if (get("Formulario") == "ClienteA") {
开发者ID:dice9030,项目名称:GestionLogistico,代码行数:31,代码来源:proforma.php

示例8: GetSetVar

// *** Parameters ***
// *** Main ***
if ($_SESSION['_LevelID'] == 1) {
    $AplikanID = GetSetVar('_pmbLoginAplikanID');
} elseif ($_SESSION['_LevelID'] == 29) {
    $AplikanID = $_SESSION['_Login'];
} else {
    die(ErrorMsg('Error', "Anda tidak berhak menjalankan modul ini."));
}
CekBolehAksesModul();
$oke = BolehAksesData($_SESSION['_Login']);
if ($oke) {
    $gel = GetaField('pmbperiod', "KodeID='" . KodeID . "' and NA", 'N', "PMBPeriodID");
    $gos = sqling($_REQUEST['gos']);
    if (empty($gos)) {
        Main($gel, $AplikanID);
    } else {
        $gos($gel, $AplikanID);
    }
}
// *** Functions ***
function Main($gel, $aplikanid)
{
    $ButuhGanti = GetaField('aplikan', 'AplikanID', $aplikanid, 'PasswordBaru');
    //if($ButuhGanti == 'Y') CekGantiPassword($gel, $aplikanid);
    Edit(0, $gel, $aplikanid);
}
function CekBolehAksesModul()
{
    $arrAkses = array(1, 29);
    $key = array_search($_SESSION['_LevelID'], $arrAkses);
开发者ID:anggadjava,项目名称:sisfor,代码行数:31,代码来源:aplikanisiform.php

示例9: switch

		}
	}
	elseif ($error = "bad_absolute_path")
	{
		echo "<b>COUNTER ERROR: Bad Absolute Path</b><br>Your absolute path value is incorrectly set in counter.php. To discover your absolute path, run the file abs.php that was packaged in the counter's zip file. After modifying counter.php refresh this page.";
		exit();
	}
	else
	{
		echo "<b>COUNTER ERROR: </b><br>The counter has an error. However, the error file could not be found to provide additional assistance. It is likely that your \"absolute path\" is not correctly set in counter.php or the counter's error file is missing.";
		exit();
	}
}

switch ($_GET['p'])
{
	case "stats": $OPTION['Hide_Counter'] = 0;
				  Main();
		break;
	case "main": Main();
		break;
	case "time" : Main();
				$shorten = microtime(); 
				print ("<br>Page took ".number_format($shorten,3)); 
				print (" seconds.<br><small>EP-Dev Counter version ".number_format($version, 1)."</small>"); 
		break;
	default : Main();
}

/* Final Cleanup */
ignore_user_abort(false);
开发者ID:rachelober,项目名称:elaria.landofrhul.com,代码行数:31,代码来源:counter.php

示例10: _getMain

 function _getMain()
 {
     ob_start();
     Main();
     $main = ob_get_contents();
     ob_end_clean();
     return $main;
 }
开发者ID:rodrigopluz,项目名称:mvc,代码行数:8,代码来源:html.class.php

示例11: shuffle

    if (count($keywords) == 0) {
        continue;
    }
    //Случай задания сайта без ключевых слов
    if ($shuffle == 1) {
        shuffle($keywords);
        //мешаем запросы
    }
    if ($i != 0 && $iterationBool == 1) {
        sleep($delay[0] + rand(0, $delay[1]));
        //задержка для всех сайтов, кроме певого
    } else {
        $time_1 = $time_start;
    }
    $iterationBool = 0;
    $resultMain = Main($depth, $url, $keywords, $site, $time_1, $delay);
    $time_2 = $resultMain['time'];
    /*
     * Расчеты времени работы скрипта заморожены со времени проекта Technoid/diplom
     */
    $time_1 = $time_2;
}
//---------------------Говорим что закончили парсинг---------------------
//$query = "UPDATE $activity_tablename SET bool = '0' WHERE seacher = '$seacher'";
//$result = mysql_query($query);
//
//if (!$result) {
//    error_message(mysql_error());
//}
//$searchRequire == 0 поиск осуществлялся в ближайшие 12 часов вывести сообщение
if ($searchRequire == 1) {
开发者ID:agalardo,项目名称:i-tim-local,代码行数:31,代码来源:parser_curl_yandex.php

示例12: shuffle

    if (count($keywords) == 0) {
        continue;
    }
    //Случай задания сайта без ключевых слов
    if ($shuffle == 1) {
        shuffle($keywords);
        //мешаем запросы
    }
    if ($i != 0 && $iterationBool == 1) {
        sleep($delay[0] + rand(0, $delay[1]));
        //задержка для всех сайтов, кроме певого
    } else {
        $time_1 = $time_start;
    }
    $iterationBool = 0;
    $time_2 = Main($depth, $url, $keywords, $site, $time_1, $delay);
    /*
     * Расчеты времени работы скрипта заморожены со времени проекта Technoid/diplom
     */
    $time_1 = $time_2;
}
//---------------------Говорим что закончили парсинг---------------------
//$query = "UPDATE $activity_tablename SET bool = '0' WHERE seacher = '$seacher'";
//$result = mysql_query($query);
//
//if (!$result) {
//    error_message(mysql_error());
//}
if ($searchRequire == 1) {
    echo 1;
} else {
开发者ID:agalardo,项目名称:i-tim-local,代码行数:31,代码来源:parser_curl_google.php

示例13: ShowHtml

function ShowHtml()
{
    global $htmlw, $page, $mode;
    if (!$htmlw || $page || $mode == 'resmsg') {
        head($buf);
        Main($buf);
        foot($buf);
        echo $buf;
    } else {
        if (!is_file(HTML_FILE)) {
            MakeHtml();
        }
        $html_file = file_exists('mod_gzip.php') ? "mod_gzip.php?" . HTML_FILE : HTML_FILE;
        echo '<META HTTP-EQUIV="refresh" content="0;URL=' . $html_file . '?' . microtime() . '">';
        #header("Location: $html_file?");
    }
}
开发者ID:h16o2u9u,项目名称:rtoss,代码行数:17,代码来源:p-bbs.php

示例14: copy

    }
    copy("index.php", $AppDir . "index.php");
    copy("html_parts.php", $AppDir . "html_parts.php");
    copy("actions.js", $AppDir . "actions.js");
    copy("musik.css", $AppDir . "musik.css");
    copy("LinnDS-jukebox-daemon.php", $AppDir . "LinnDS-jukebox-daemon.php");
    copy("ServerState.php", $AppDir . "ServerState.php");
    copy("LPECClientSocket.php", $AppDir . "LPECClientSocket.php");
    copy("LinnDSClientSocket.php", $AppDir . "LinnDSClientSocket.php");
    copy("StringUtils.php", $AppDir . "StringUtils.php");
    copy("SocketServer.php", $AppDir . "SocketServer.php");
    copy("LinnDS-jukebox-daemon-old.php", $AppDir . "LinnDS-jukebox-daemon-old.php");
    copy("S98linn_lpec", $AppDir . "S98linn_lpec");
    copy("Transparent.gif", $AppDir . "Transparent.gif");
    copy("setup.php", $AppDir . "setup.php");
    copy("Send.php", $AppDir . "Send.php");
    copy("MusicDB.php", $AppDir . "MusicDB.php");
    copy("QueryAlbum.php", $AppDir . "QueryAlbum.php");
    copy("QueryAlbumList.php", $AppDir . "QueryAlbumList.php");
    copy("QueryAlphabetPresent.php", $AppDir . "QueryAlphabetPresent.php");
    copy("QueryDB.php", $AppDir . "QueryDB.php");
    copy("QueryPlayingNowDB.php", $AppDir . "QueryPlayingNowDB.php");
    echo "Making sprites and css file in " . $AppDir . $NL;
    Make_CSS($musicDB->MaxPreset(), $AppDir . "sprites/sprites.css", $AppDir . "sprites/sprites@2x.css");
    $musicDB->close();
    copy($DATABASE_FILENAME, $AppDir . $DATABASE_FILENAME);
    echo "Finished..." . $NL;
}
//Main(1);
Main(1);
开发者ID:HenrikTolboel,项目名称:LinnDS-jukebox,代码行数:30,代码来源:Build.php

示例15: json_decode

$Data_text = $_GET['data'];
//------------------------json_decode работает только с UTF-8----------------------------
$Data = json_decode($Data_text, true);
if (!is_array($Data)) {
    $Data_text = iconv('windows-1251', 'utf-8', $Data_text);
    $Data = json_decode($Data_text, true);
}
unset($Data_text);
//-------------------Обход массива с данными $Data и выполнение запросов----------------
shuffle($Data);
//мешаем элементы
/*главная функция
 * описана в ggl_parser_curl.php
 * осуществляет поиск и граббинг емэйл
 */
Main($depth, $url, $Data);
//Результаты парсинга здесь ----->>>       $resultAdress (array)((str)$keyword,(str)$site,(str)$title,(array)$email)
/*
 * Ответ возвращаемый index.php через ajax
 */
echo 'Просмотрено ' . $countCurl . ' страниц<br/>';
echo '<table width="100%" id="resultTable" cellspacing="0">';
echo '<tr><td width="5%"><b>№</b></td><td width="10%"><b>keyword</b></td><td width="10%"><b>site</b></td><td width="45%"><b>title</b></td><td width="15%"><b>contact</b></td><td width="15%"><b>email</b></td></tr>';
foreach ($resultAdress as $i => $value) {
    echo '<tr>';
    echo '<td>';
    echo $i + 1;
    echo '</td>';
    foreach ($value as $i => $val) {
        if ($i == 4) {
            echo '<td>';
开发者ID:agalardo,项目名称:i-tim-local,代码行数:31,代码来源:parser_curl_grabber.php


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