當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。