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


PHP getDetails函数代码示例

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


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

示例1: GetFeed

function GetFeed()
{
    return getDetails() . getItems();
}
开发者ID:5haman,项目名称:Sendy,代码行数:4,代码来源:campaigns-rss.php

示例2: main

function main($username, $password, $option)
{
    $loginUrl = 'http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin.jsp';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $loginUrl);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, 'txtSN=' . $username . '&txtPD=' . $password . '&txtPA=1');
    curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $store = curl_exec($ch);
    if (strpos($store, "Login failed, Username and password do not match") == false) {
        if ($option == "1") {
            $ret = storeDatabase("account_details", "('" . $username . "','" . $password . "')");
            if ($ret == 1) {
                getDetails($username, $ch);
            }
        } else {
            if ($option == "2") {
                getMarks($username, $ch);
            } else {
                if ($option == "3") {
                    getAttendance($usename, $ch);
                }
            }
        }
    } else {
        echo "fail";
    }
}
开发者ID:saiprashanth173,项目名称:schedule_manager,代码行数:29,代码来源:login.php

示例3: showareas

function showareas()
{
    doAreaEdit();
    global $indexTemplateAreas;
    //execute the nano site in demo to read the content areas
    demoExecuteNanoSite();
    $sett = getDetails('settings');
    $contents = $sett['def-template-areas'];
    $areaInfo = array();
    foreach ($contents as $areaName) {
        $areaFile = areaDataDir("{$areaName}");
        $fileContent = file_exists($areaFile) ? file_get_contents($areaFile) : '';
        $areaInfo[$areaName] = $fileContent;
    }
    $saveAllTxt = lt('Save all Areas');
    $biggerInp = lt('Bigger Input Box');
    $smallerInp = lt('Smaller Input Box');
    echo "<form action='?action=showareas&do=editarea' method='post'>";
    echo "<input type='submit' value='+ {$saveAllTxt} +' class='floatright'>";
    echo "<input type='hidden' name='areaCount' value='" . count($areaInfo) . "'>";
    $cnt = 1;
    foreach ($areaInfo as $areaName => $areaContents) {
        $boxId = "box{$cnt}";
        //md5($areaName);
        echo "<h2>&raquo; {$areaName}</h2>\r\n\t\t\t    <input type='hidden' name='areaName{$cnt}' value='{$areaName}'>\r\n\t\t\t\t<table><tr valign='top'><td>\r\n\t\t\t\t<textarea name='areaContent{$cnt}' rows='2' cols='60' id='{$boxId}' class='areabox'>" . htmlentities($areaContents) . "</textarea>\r\n\t\t\t\t</td><td>\r\n\t\t\t\t<input type='button' onclick='makesmall(\"{$boxId}\")' value='-' title='{$smallerInp}' class='isizeh'>\r\n\t\t\t\t<input type='button' onclick='makebig(\"{$boxId}\")' value='+' title='{$biggerInp}' class='isizeh'>\r\n\t\t\t\t</td></tr></table>\r\n\t\t\t ";
        $cnt++;
    }
    echo "<input type='submit' value='+ {$saveAllTxt} +' class='floatright'>";
    echo "</form>";
    echo "<script language='javascript'>\r\n\t\t\tfunction makebig(id) {\r\n\t\t\tobj = document.getElementById(id);\r\n\t\t\tif( obj.rows < 30 ) obj.rows+= 5;\r\n\t\t\t}\r\n\t\t\tfunction makesmall(id) {\r\n\t\t\tobj = document.getElementById(id);\r\n\t\t\tif( obj.rows > 5 ) obj.rows-= 5;\r\n\t\t\t}\r\n\t\t  </script>";
}
开发者ID:appcoding2,项目名称:nano-cms,代码行数:31,代码来源:admin.contentareas.lib.php

示例4: show_nano_updates

function show_nano_updates()
{
    //to provide updates in native lang
    $lang = getDetails('language');
    //to track the version being used
    $url = urlencode($_SERVER['REQUEST_URI']);
    $ver = getDetails('version');
    $query = "lang={$lang}&version={$ver}&url={$url}&timetoken=" . time() . "&pg=" . $_GET['action'] . $_GET['tweak'] . '&js=1';
    runTweak('show-nano-updates', array(&$query));
    //send the query and load updates
    if ((isset($_GET['action']) or isset($_GET['tweak'])) and !isset($_SESSION['nag'])) {
        return;
    }
    echo "<script src='http://nanocms.in/recent_updates.php?{$query}' language='javascript'></script>";
}
开发者ID:appcoding2,项目名称:nano-cms,代码行数:15,代码来源:nanoadmin.php

示例5: writeOrders

function writeOrders($fname, $sname, $price, $email, $Phone_number)
{
    $filehandle = fopen("orders.txt", "a");
    $cart = array();
    $cart = $_SESSION['cart'];
    $cart_string = "";
    $order_details = array();
    $order_details[] = $fname;
    $order_details[] = $sname;
    $order_details[] = $price;
    $order_details[] = $email;
    $order_details[] = $Phone_number;
    foreach ($cart as $product_id => $product_qty) {
        $product_details = array();
        $product_details = getDetails($product_id);
        $cart_string .= ":" . $product_details['product_name'] . "=" . $product_qty;
    }
    $order_string = implode("|", $order_details);
    $order_string .= $cart_string;
    fwrite($filehandle, "{$order_string}\n");
    fclose($filehandle);
}
开发者ID:s3483592,项目名称:Assignment-2,代码行数:22,代码来源:global-functions.php

示例6: preg_match_all

preg_match_all($pagedescriptionExtract, $data, $pagedescriptiona, PREG_SET_ORDER);
$pagedescription = trim($pagedescriptiona[0][0]);
//if($pagedescription == ""){$pagedescription = "no description";}
$pagedescription = str_ireplace("& ", "&amp; ", $pagedescription);
//find charset
$charsetExtract = "/(?<=charset=).*?(?=\")/i";
preg_match_all($charsetExtract, $data, $charseta, PREG_SET_ORDER);
$charset = $charseta[0][0];
//----------REGEX IT BABY----------//
//find matching texts with regex
preg_match_all($titlesPattern, $data, $titles, PREG_SET_ORDER);
preg_match_all($linksPattern, $data, $links, PREG_SET_ORDER);
preg_match_all($descriptionsPattern, $data, $descriptions, PREG_SET_ORDER);
preg_match_all($datesPattern, $data, $dates, PREG_SET_ORDER);
//----------CREATE THE FEED----------//
$xmldata = getDetails() . getItems();
function getDetails()
{
    global $site, $language, $pagetitle, $pagedescription, $charset;
    //check if charset is empty
    if ($charset == "") {
        $charset = "UTF-8";
    }
    $details = '<?xml version="1.0" encoding="' . $charset . '" ?>
	<rss version="2.0">
		<channel>
			<title>' . $pagetitle . '</title>
			<link>' . $site . '</link>
			<description>' . $pagedescription . '</description>
			<language>' . $language . '</language>';
    return $details;
开发者ID:Knorcedger,项目名称:main,代码行数:31,代码来源:feedboiler.php

示例7: nanoadmin_showsettings

function nanoadmin_showsettings()
{
    $home = getDetails('homepage');
    $pages = getDetails('titles');
    $slugs = getDetails('slugs');
    $username = getDetails('username');
    $seourl_stat = (bool) getDetails('seourl');
    $seourl = array(lt('Disabled'), lt('Enabled'));
    $is_modrewrite_available = true;
    if (isset($_POST['save'])) {
        runTweak('save-settings');
        $_POST = array_map('stripslashes', $_POST);
        $home = $_POST['homepage'];
        $seourl_stat = $_POST['seourls'];
        $seourl_stat = $is_modrewrite_available ? $seourl_stat : 0;
        if ($seourl_stat == 1) {
            file_put_contents(NANO_INDEX_LOCATION . '.htaccess', NANO_HTACCESS_FORMAT);
        } else {
            unlink(NANO_INDEX_LOCATION . '.htaccess');
        }
        $username = $_POST['username'];
        $password = $_POST['password'];
        setDetails('homepage', $home);
        setDetails('seourl', $seourl_stat);
        if (!empty($username)) {
            setDetails('username', $username);
        }
        if (!empty($password)) {
            setDetails('password', md5($password));
            //reset the logged session variable
            $_SESSION[NANO_CMS_ADMIN_LOGGED] = md5(md5($password) . $_SESSION[LOGIN_TIME_STAMP]);
        }
        if (savepages()) {
            MsgBox(lt('Settings were saved successfully'), 'greenbox');
        }
    }
    $word_homepage = lt('Home Page');
    $word_sefurl = lt('Search Engine Friendly URL\'s');
    $word_new = lt('New');
    $word_username = lt('Username');
    $word_password = lt('Password');
    $word_leaveitemtpy = lt("Leave empty if you don't want to change", 'leave-empty-for-no-change');
    $word_loginsettings = lt("Login Settings");
    $word_save = lt("Save Changes");
    $word_settings = lt("NanoCMS Settings");
    if ($is_modrewrite_available) {
        $select_seourl = html_select('seourls', $seourl, $seourl_stat);
        $word_modrewrite = lt("mod_rewrite is required and is available");
    } else {
        $select_seourl = html_select('seourls', $seourl, $seourl_stat, ' disabled="disabled"');
        $word_modrewrite = lt("mod_rewrite is <b>not available</b>, please contact your host or enable it via httpd.conf", 'modrewrite-not-available');
    }
    $select_homepage = html_select('homepage', $pages, $home);
    echo $output = <<<NANO_SETTINGS
\t<h2>{$word_settings}</h2>
\t<form action="#" method="POST" accept-charset="utf-8">
\t\t<table width="100%" cellpadding="5">
\t\t\t<tr>
\t\t\t\t<td>{$word_homepage}</td><td>{$select_homepage}</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td>{$word_sefurl} <br /><small>[ {$word_modrewrite} ]</small></td><td>{$select_seourl}</td>
\t\t\t</tr>
\t\t\t<tr><td>&nbsp;</td></tr>
\t\t\t<tr>
\t\t\t\t<td colspan="2"><h2>{$word_loginsettings}</h2></td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td colspan="2">{$word_leaveitemtpy}</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td>{$word_new} {$word_username}</td><td><input type="text" value="{$username}" name="username" /></td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td>{$word_new} {$word_password}</td><td><input type="text" name="password" value="" /></td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td><br /><input type="submit" value="{$word_save}" name="save" /></td>
\t\t\t</tr>
NANO_SETTINGS;
    runTweak('admin-settings');
    echo "\r\n\t\t</table>\r\n\t</form>";
}
开发者ID:a6smile,项目名称:dvdbrowsereview,代码行数:83,代码来源:admin.settings.lib.php

示例8: chatGetUser

 function chatGetUser()
 {
     global $db;
     $userID = getUserID();
     $sql = 'SELECT * FROM user
         WHERE user_id =' . $userID . ' LIMIT 1;';
     $results = $db->select($sql);
     $user = $results->fetchAll(PDO::FETCH_ASSOC);
     echo json_encode($user, JSON_PRETTY_PRINT);
 }
 //---------------------------------------------------------------------
 //Handles which function gets executed
 if (isset($_GET['function'])) {
     switch ($_GET['function']) {
         case 'details':
             getDetails();
             break;
         case 'addLobby':
             addLobby();
             break;
         case 'listLobby':
             listLobby();
             break;
         case 'tranChat':
             transform();
             break;
         case 'tranLoby':
             transform();
             break;
         case 'addGame':
             addFavList();
开发者ID:Jackson3195,项目名称:tfproject,代码行数:31,代码来源:io.php

示例9: trim

require './includes/lib_products.php';
require './includes/config.php';
require './includes/init.php';
require './lang/' . $_SESSION['lang'] . '/compare.php';
$project = trim($_GET['proj']);
$db->changeDB($project);
$items = $_SESSION[$project]['idList'];
$lang = $_SESSION['lang'];
$ids = array_keys($items);
$comProducts = array();
$directory = getDirectoryWithLink($project);
$count = 0;
if (!empty($ids)) {
    foreach ($ids as $k => $v) {
        // echo $v;
        $comProducts[] = getDetails($v, 2, $lang);
        $count = count($comProducts);
    }
}
//print_r($comProducts);
$smarty->assign('lang', $_LANG);
$smarty->assign('count', $count);
$smarty->assign('directory', $directory);
$smarty->assign('products', $comProducts);
$smarty->assign('project', $project);
$smarty->assign('title', "Comparison");
if (isMobile()) {
    $smarty->display('compare_m.tpl');
} else {
    $smarty->display('compare.tpl');
}
开发者ID:buaacotest,项目名称:cotest,代码行数:31,代码来源:compare.php

示例10: date

if (!is_readable('./config.php')) {
    echo "<H2>Error: Configuration file config.php does not exist. Please\n    notify your system administrator.</H2>";
    exit;
} else {
    include_once './config.php';
}
require_once "./common.php";
require_once "./tools.php";
################################################################
# Get current date and time
################################################################
$date = date('Y-m-d');
$time = date('H:i') . ":00";
$statusMsg = "";
foreach ($server as $host) {
    $master_array = getDetails($host);
    $license_array = $master_array['licenses'];
    $users = $master_array['users'];
    $status_array = $master_array['status'];
    if (strlen($status_array['msg']) > 1) {
        emailAlerts($host, $status_array['msg']);
    }
    foreach ($license_array as $feature => $feature_array) {
        $license_used = 0;
        $num_licenses = 0;
        # add up all the licenses available to each product feature
        foreach ($feature_array as $key) {
            $license_used += $key['licenses_used'];
            $num_licenses += $key['num_licenses'];
            $server = $host['hostname'];
            $feature_name = $feature;
开发者ID:tseel,项目名称:phplicensewatcher,代码行数:31,代码来源:license_util.php

示例11: isset

include_once '../php/detail_back.php';
include_once "commentaire/commentaire.php";
include_once "evolution/evolution.php";
include_once "supprimer.php";
include_once "get_ticket.php";
include_once "get_details.php";
// Récupération de l'identifiant de l'utilisateur connecté
$session_id = $_SESSION['usr_connected']['id'];
/*
 * "IF" Au cas où l'url à été "trafiquée"
 * --------------------------------------
 */
if (isset($_GET['ticketid'])) {
    $id_ticket = $_GET['ticketid'];
    $action = isset($_POST['edition']) ? "edition" : "encours";
    $details = getDetails($action, $id_ticket, $bdd);
} else {
    header('Location: lister_ticket_encours.php');
    $_SESSION['msg'] = 'Vous ne pouvez pas accèder aux détails du ticket comme cela, choisissez un ticket en cliquant sur l\'icône dans la colonne "détails".';
    exit;
}
// Si l'utilisateur a envoyer le formulaire
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $session_id = $_SESSION['usr_connected']['id'];
    /*
     *  Resoudre 
     */
    if (isset($_POST['resoudre'])) {
        // MAJ du ticket
        // -------------
        $sql = "UPDATE `TICKET`\n\t\t\t\tSET `NUM_STATUT` = '4'\n\t\t\t\tWHERE `ID` = {$id_ticket};";
开发者ID:ZePadNom,项目名称:Atelier,代码行数:31,代码来源:details_ticket_encours.php

示例12: demoExecuteNanoSite

function demoExecuteNanoSite()
{
    global $indexTemplateAreas, $indexTemplateLL;
    $sett = getDetails('settings');
    $catt = getDetails('cats');
    $indexLastModified = filemtime(NANO_CMS_PAGE);
    if ($sett['index-last-modified'] >= $indexLastModified) {
        return;
    }
    $removeFunctionList = array('show_sidebar', 'show_content_slug', 'show_title', 'require_once');
    $replaceFunction = 'dummyFunction';
    $demoContentToRun = file_get_contents(NANO_CMS_PAGE);
    $demoContentToRun = str_replace('show_content_area', 'readIntoAreaList', $demoContentToRun);
    $demoContentToRun = str_replace('show_links', 'readIntoLinksList', $demoContentToRun);
    $demoContentToRun = str_replace($removeFunctionList, $replaceFunction, $demoContentToRun);
    ob_start();
    eval(" ?> " . $demoContentToRun . " <?php ");
    $cont = ob_get_contents();
    ob_end_clean();
    MsgBox(lt("Template Changes Detected! Config & Settings updated!", 'template-changes-detected'));
    $newcatt = array_diff($indexTemplateLL, array_keys($catt));
    foreach ($newcatt as $newcatname) {
        $catt[$newcatname] = array();
    }
    foreach ($indexTemplateAreas as $k => $v) {
        $indexTemplateAreas[$k] = strtolower($v);
    }
    $sett['index-last-modified'] = $indexLastModified;
    $sett['def-template-areas'] = array_unique($indexTemplateAreas);
    $sett['def-template-links'] = array_unique($indexTemplateLL);
    setDetails('settings', $sett);
    setDetails('cats', $catt);
    savepages();
}
开发者ID:appcoding2,项目名称:nano-cms,代码行数:34,代码来源:admin.tweakers.lib.php

示例13: printHistory

function printHistory($history)
{
    echo "<table class ='pure-table pure-table-bordered'>";
    echo "<thead><tr><th>Reservation Id</th><th>Date of Departure (GMT)</th><th>Depart City</th>" . "<th>Depart Country</th><th>Arrival City</th><th>Arrival Country</th>" . "<th>Class</th><th>Number of tickets</th><th>Credit card #</th>" . "<th>COST (CAD)</th></thead>";
    $it = 0;
    while ($tuple = OCI_Fetch_Array($history, OCI_ASSOC)) {
        $numFlights = 1;
        if (array_key_exists("FID3", $tuple)) {
            $numFlights = 3;
        } else {
            if (array_key_exists("FID2", $tuple) && array_key_exists("FID3", $tuple) != TRUE) {
                $numFlights = 2;
            }
        }
        $details = getDetails($tuple, $numFlights);
        echo "<tr><td>" . $tuple['RESID'] . "</td><td>" . $details['DEPARTDATE'] . "</td><td>" . $details['DEPARTCITY'] . "</td><td>" . $details['DEPARTCOUNTRY'] . "</td><td>" . $details['ARRIVALCITY'] . "</td><td>" . $details['ARRIVALCOUNTRY'] . "</td><td>" . parseClass($tuple['PCLASS']) . "</td><td>" . $tuple['TICKET_NUM'] . "</td><td>" . parseCard($tuple['CREDITCARD']) . "</td><td>" . $tuple['TOTAL_COST'] . "</td></tr>";
        echo "<tr><td>";
        $flight = array("FIRSTID" => $tuple['FID1']);
        if ($numFlights >= 2) {
            $flight["SECONDID"] = $tuple['FID2'];
        }
        if ($numFlights == 3) {
            $flight["THIRDID"] = $tuple['FID3'];
        }
        printDetails($flight, $it, 1);
        echo "</td></tr>";
        $it++;
    }
    echo "</table>";
}
开发者ID:holybom,项目名称:ubcair,代码行数:30,代码来源:list_reservation.php

示例14: showpageslist

function showpageslist()
{
    global $nc;
    demoExecuteNanoSite();
    $cdt = getDetails('cats');
    $sett = getDetails('settings');
    $slugs = getDetails('slugs');
    $titles = getDetails('titles');
    $templateCats = $sett['def-template-links'];
    $defaultCats = explode(',', NANO_MUSTHAVE_CATS);
    $musthaveCats = array_unique(array_merge($templateCats, $defaultCats));
    $selectedCat = 1;
    $toggStat = 'false';
    if (isset($_GET[addcat])) {
        $newCatName = strtolower(stripslashes($_POST[catname]));
        if (in_array($newCatName, array_keys($cdt))) {
            $msg = sprintf(lt("Cannot add new Links Category : %s already exists", 'cat-add-fail-already-exists'), "<b>{$newCatName}</b>");
            MsgBox($msg);
        } else {
            $cdt[$newCatName] = array();
            $msg = sprintf(lt("Pages Category %s Added Successfully", 'cat-add-success'), "<b>{$newCatName}</b>");
            MsgBox($msg, 'greenbox');
            setDetails('cats', $cdt);
            savepages();
        }
    }
    if (isset($_GET[removecat])) {
        $catN = $_GET[removecat];
        if (!in_array($catN, array_keys($cdt))) {
            MsgBox(lt("Category to be deleted does not exist", 'cat-to-del-not-exists'), 'redbox');
        } else {
            if (in_array($catN, $musthaveCats)) {
                MsgBox("<b>{$catN}</b> : " . lt('Cannot be deleted'), 'redbox');
            } else {
                unset($cdt[$catN]);
                $msg = sprintf(lt("Pages Category %s was removed Successfully", 'cat-remove-success'), "<b>{$catN}</b>");
                MsgBox($msg, 'greenbox');
                setDetails('cats', $cdt);
                savepages();
            }
        }
    }
    if (isset($_GET[addtocat])) {
        $slug2add = $_POST[page];
        $cat2add = $_POST[cat];
        if (in_array($slug2add, $cdt[$cat2add])) {
            $msg = sprintf(lt("The page %s is already listed in %s", 'page-already-listed'), "<b>{$titles[$slug2add]}</b>", "<b>{$cat2add}</b>");
            MsgBox($msg);
        } else {
            array_push($cdt[$cat2add], $slug2add);
            $msg = sprintf(lt("The page %s was added successfully under %s", 'page-to-cat-add-success'), "<b>{$titles[$slug2add]}</b>", "<b>{$cat2add}</b>");
            MsgBox($msg);
            setDetails('cats', $cdt);
            savepages();
            $selectedCat = $cat2add;
            $toggStat = 'true';
        }
    }
    $catSelectList = array();
    foreach ($cdt as $cN => $cSC) {
        $catSelectList[$cN] = $cN;
    }
    $pagesAndOpt = lt('Pages & Category Options', 'page-and-cat-opt');
    $pagesListing = lt('Pages & Category Listing', 'page-and-cat-list');
    $addNewCat = lt('Add new Category');
    $addToAnotherCat = lt('Add page to another category', 'add-page-to-another-cat');
    $addLabel = lt('Add');
    $useUrlLabel = lt('Url you can use');
    $moveLabel = lt('Move');
    $optLabel = lt('Options');
    $pageLabel = lt('Page');
    echo "<a href='#nogo' class='nodeco'><h2 id='cat_anchor' class='cattitle'><span id='toggCon'></span>{$pagesAndOpt}</h2></a>\r\n\t\t\t<table id='cat_options'>\r\n\t\t\t <tr>\r\n\t\t\t \t<form action='?action=showpages&addcat=true' method='post'>\r\n\t\t\t\t<td>{$addNewCat} : </td><td><input type='text' name='catname'> <input type='submit' value='{$addLabel}'></td>\r\n\t\t\t\t</form>\r\n\t\t\t </tr>\r\n\t\t\t <tr>\r\n\t\t\t\t<form action='?action=showpages&addtocat=true' method='post'>\r\n\t\t\t\t<td>{$addToAnotherCat}</td><td>" . pagesList('page', $titles, 0) . " to " . pagesList('cat', $catSelectList, $selectedCat) . "\r\n\t\t\t\t\t <input type='submit' value='{$addLabel}'>\r\n\t\t\t\t</td>\r\n\t\t\t\t</form>\r\n\t\t\t </tr>\r\n\t\t\t</table>";
    $js = "catopt = new Toggle('cat_options',{$toggStat},'cat_anchor');catopt.setToggleContent( 'toggCon', '+', '-' );";
    $v = 0;
    echo "<h2>&raquo; {$pagesListing}</h2>";
    echo "<div class='linkcats-div'>";
    foreach ($cdt as $catname => $catslugs) {
        $v++;
        $slugids = array_values($catslugs);
        $n = count($slugids) - 1;
        if (!in_array($catname, $musthaveCats)) {
            $removeOpt = "( <a href='?action=showpages&removecat={$catname}'>remove</a> )";
        } else {
            $removeOpt = '';
        }
        //just user interface stuff
        $toggStat = $catname == $_SESSION[opencat] ? 'true' : 'false';
        if (!isset($_SESSION[opencat]) and $catname == 'sidebar') {
            $toggStat = true;
        }
        if ($catname == $_SESSION[opencat]) {
            $toggStat = 'true';
            unset($_SESSION[opencat]);
        } else {
            $toggStat == 'false';
        }
        $js .= "catopt{$v} = new Toggle('t{$v}',{$toggStat},'h2{$v}'); catopt{$v}.setToggleContent( 'co{$v}', '+', '-' );";
        echo "<a href='#nogo'><h2 class='cattitle noborder' id='h2{$v}'><span id='co{$v}' class='togg'>&raquo;</span> {$catname} {$removeOpt}</h2></a>";
        echo "<div class='borderWrap'>";
        echo "<table cellpadding='5px' cellspacing='2px'  width='100%' id='t{$v}' class='pageListTable'>";
//.........这里部分代码省略.........
开发者ID:appcoding2,项目名称:nano-cms,代码行数:101,代码来源:admin.pages.lib.php

示例15: getDetails

                    return true;
                }
            }
        }
        function getDetails($fileArr)
        {
            foreach ($fileArr['name'] as $keyee => $info) {
                $uploads[$keyee]->name = $fileArr['name'][$keyee];
                $uploads[$keyee]->type = $fileArr['type'][$keyee];
                $uploads[$keyee]->tmp_name = $fileArr['tmp_name'][$keyee];
                $uploads[$keyee]->error = $fileArr['error'][$keyee];
            }
            return $uploads;
        }
        if ($_FILES['filesInput']) {
            $uploads = getDetails($_FILES['filesInput']);
            $fileUploader = new fileUploader($uploads);
        }
        // Run our custom processes
        include_once "../processes/on-file-upload.php";
    } else {
        $doNext .= "top.ICEcoder.message('" . $t['Sorry, cannot upload...'] . "');";
        $finalAction = "nothing";
    }
    $doNext .= "top.ICEcoder.hideFileMenu();top.document.getElementById('fileInput').value='';top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));";
    // Upload is not handled by XHR methods, but form post, so we need to manually trigger $doNext in a script tag
    echo "<script>" . $doNext . "</script>";
}
// ========================
// DELETE FILE(S)/FOLDER(S)
// ========================
开发者ID:sanyaade-buildtools,项目名称:ICEcoder,代码行数:31,代码来源:file-control-xhr.php


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