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


PHP getlist函数代码示例

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


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

示例1: form

function form(&$err)
{
    if (isset($_POST)) {
        global $_POST;
    } else {
        return;
    }
    global $db;
    if (sending()) {
        $_SESSION = array();
        if (isset($_POST['flash'])) {
            $flash = ' -flash';
        } else {
            $flash = '';
        }
        if ($list = getlist($_POST['number'])) {
            foreach ($list->numbers as $no) {
                $err->out = Gammu::infiniteSend($_POST['message'], $no, $flash);
                if ($err->out != 0) {
                    $err->numberInError[] = getNameOf($no);
                }
            }
        } else {
            $users = $db->table('directory')->find();
            foreach ($users as $user) {
                if (isset($user->name) and $user->name == $_POST['number']) {
                    $_POST['number'] = $user->number;
                }
            }
            $_POST['number'] = str_replace(' ', '', $_POST['number']);
            $err->out = Gammu::send($_POST['message'], $_POST['number'], $flash);
            if ($err->out != 0) {
                formSetSessionValues();
            }
        }
    } else {
        if (saveContact()) {
            $_POST['number'] = str_replace(' ', '', $_POST['number']);
            $err->in = $db->table('directory')->insert($_POST);
        } else {
            if (saveList()) {
                $list = array("list" => $_POST['list']);
                $i = 1;
                while (isset($_POST['number' . $i])) {
                    if (!empty($_POST['number' . $i])) {
                        if ($number = getNumberOfName($_POST['number' . $i])) {
                            $list['numbers'][] = $number;
                        } else {
                            $list['numbers'][] = $_POST['number' . $i];
                        }
                    }
                    $i++;
                }
                $err->listin = $db->table('lists')->insert($list);
            } else {
                $err->errorMessages();
            }
        }
    }
}
开发者ID:assistechnologie,项目名称:flashsms,代码行数:60,代码来源:form.function.php

示例2: popup

function popup()
{
    $LIST = getlist();
    $add = Paragraphe("host-file-64-add.png", "{add_new_entry}", "{add_new_entry_text}", "javascript:etc_hosts_add_form()", "{add_new_entry_text}");
    $html = "<p style='font-size:12px'>{etc_hosts_explain}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'><div style='width:100%;height:330px;overflow:auto' id='idhosts'>{$LIST}</div></td>\n\t\t<td valign='top'>{$add}</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body("{$html}");
}
开发者ID:brucewu16899,项目名称:artica,代码行数:8,代码来源:system-etc-hosts.php

示例3: popup

function popup(){
	$page=CurrentPageName();
	$LIST=getlist();
	$sock=new sockets();
	
	$html="<div class=explain>{etc_hosts_explain}</div>
	
	<div style='text-align:right'>
	<table>
	<tr>
		<td class=legend>{DisableEtcHosts}:</td>
		<td>". Field_checkbox("DisableEtcHosts",1,$sock->GET_INFO("DisableEtcHosts"),"DisableEtcHostsSave()")."</td>
	</tr>
	</table>
	</div>
	
	<table style='width:100%'>
	<tr>
		<td valign='top'><div style='width:100%;height:330px;overflow:auto' id='idhosts'>$LIST</div></td>
		<td valign='top'><div id='add-etc-hosts-p'></div></td>
	</tr>
	</table>
	<script>
	function ParEtcHosts(){
		LoadAjax('add-etc-hosts-p','$page?add-etc-hosts-p=yes');
	}
	
	function idhostsList(){
		LoadAjax('idhosts','$page?refresh=yes');
	
	}
	
	var x_DisableEtcHostsSave=function (obj) {
			tempvalue=obj.responseText;
			if(tempvalue.length>0){alert(tempvalue);}
			ParEtcHosts();
			idhostsList();
	    }
	
	
		function DisableEtcHostsSave(){
		var XHR = new XHRConnection();
		if(document.getElementById('DisableEtcHosts').checked){
			XHR.appendData('DisableEtcHosts','1');}else{
			XHR.appendData('DisableEtcHosts','0');}
			document.getElementById('add-etc-hosts-p').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';			
			XHR.sendAndLoad('$page', 'GET',x_DisableEtcHostsSave);		
		}
	
	ParEtcHosts();
	</script>
	
	";
	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body("$html");	
	
	
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:58,代码来源:system-etc-hosts.php

示例4: check_oauth

function check_oauth($auth, $id)
{
    include 'sql.php';
    $SQL = "SELECT * FROM oauth WHERE profile_id = {$id}";
    $result = $conn->query($SQL);
    if ($result->num_rows > 0) {
        $row = $result->fetch_assoc();
        if ($row['oauth_key'] == $auth) {
            getlist();
            $conn->close();
        } else {
            $apiResponse = array('status' => 'error', 'statusCode' => 404, 'message' => 'User not found');
            print_r(json_encode($apiResponse));
        }
    }
}
开发者ID:shahfasal,项目名称:VSM-android,代码行数:16,代码来源:videolist.php

示例5: ceil

        return $list;
    }
    //处理分页不同量
    $shownum = 10;
    $webnum = 42;
    $startnum = $page * $shownum - $shownum;
    $endnum = $page * $shownum;
    $qp = ceil($startnum / $webnum);
    $qp = $qp ? $qp : 1;
    $qpcount = $qp * $webnum;
    $list = getlist($type, $qp);
    if ($endnum > $qpcount) {
        $y = $endnum % $webnum;
        $m = $shownum - $y;
        $list = array_values(array_slice($list, $m * -1, $m));
        $t = array_slice(getlist($type, $qp + 1), 0, $y);
        foreach ($t as $value) {
            $list[] = $value;
        }
    } else {
        $y = $endnum % $webnum;
        $list = array_slice($list, $y - $shownum, $shownum);
    }
} else {
    //搜索
    $key = urlencode($_GET['key']);
    $url = "http://searchapi.pptv.com/query/nt?cb=recSearchData&q={$key}";
    $content = get_url_contents($url, 'http://www.pptv.com/');
    $content = substr($content, strpos($content, '(') + 1, -1);
    $json = json_decode($content, true);
    $list = array();
开发者ID:Corzcode,项目名称:ims,代码行数:31,代码来源:video_list_xml.php

示例6: exit

if (!defined('ROOT')) {
    exit('No direct script access allowed');
}
loadModuleLib('api', 'api');
$page = $_REQUEST['page'];
$pageArr = explode("/", $page);
if (isset($pageArr[2]) && strlen($pageArr[2]) <= 0) {
    unset($pageArr[2]);
}
if (count($pageArr) > 1) {
    $title = end($pageArr);
    $title = explode("-", $title);
    $title = implode(" ", $title);
    //$titleArr=explode("-",$title);
    //$category=end($titleArr);
    $apiCategoryList = getlist($title);
}
?>
<div class="apiContent container-fluid">
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header">
					<small><?php 
echo toTitle($category);
?>
 APIs</small>
				</h1>
			<div class="navigation">
				<ul class="list-group linkList">
					<?php 
if (count($apiCategoryList) > 0) {
开发者ID:OpenLogiks,项目名称:APIDocs,代码行数:31,代码来源:list.php

示例7: sprintf

$extendedPath = $_GET['path'];
$action = $_GET['action'];
$boxDetailsSQL = sprintf("SELECT box.boxid, box.ip, box.login, box.password, box.sshport, srv.path\n\t\t\t\t\t\t\tFROM %sbox box\n\t\t\t\t\t\t\tJOIN %sserver srv ON box.boxid = srv.boxid\n\t\t\t\t\t\t\tJOIN %sgroupMember grpm ON (grpm.groupids LIKE CONCAT(srv.groupid, ';%%')\n\t\t\t\t\t\t\t\t\t\t\t\t\t  OR grpm.groupids LIKE CONCAT('%%;', srv.groupid, ';%%'))\n\n\t\t\t\t\t\t\tWHERE srv.serverid = %d\n\t\t\t\t\t\t\tAND grpm.clientid = %d;", DBPREFIX, DBPREFIX, DBPREFIX, $serverid, $clientid);
$boxDetails = mysql_query($boxDetailsSQL);
$rowsBoxes = mysql_fetch_assoc($boxDetails);
$aes = new Crypt_AES();
$aes->setKeyLength(256);
$aes->setKey(CRYPT_KEY);
$sftp = new Net_SFTP($rowsBoxes['ip'], $rowsBoxes['sshport']);
if (!$sftp->login($rowsBoxes['login'], $aes->decrypt($rowsBoxes['password']))) {
    echo 'Failed to connect';
    die;
}
//ACTION SELECTOR
if ($action == 'list') {
    getlist($rowsBoxes, $extendedPath, $sftp);
}
if ($action == 'fileUpload') {
    fileUpload($rowsBoxes, $extendedPath, $sftp);
}
if ($action == 'delete') {
    delete($rowsBoxes, $extendedPath, $sftp);
}
//ACTION FUNCTIONS
function delete($rowsBoxes, $extendedPath, $sftp)
{
    $remoteFile = dirname($rowsBoxes['path']) . '/' . trim($extendedPath . '/');
    return $sftp->delete($remoteFile, true);
}
function fileUpload($rowsBoxes, $extendedPath, $sftp)
{
开发者ID:kokisoftware,项目名称:BGP_File_Manager,代码行数:31,代码来源:filemanagerajax.php

示例8: exit

<?php

if (!defined('ROOT')) {
    exit('No direct script access allowed');
}
loadModuleLib('api', 'api');
$page = $_REQUEST['page'];
$pageArr = explode("/", $page);
if (isset($pageArr[2]) && strlen($pageArr[2]) <= 0) {
    unset($pageArr[2]);
}
if (count($pageArr) > 1) {
    $title = end($pageArr);
    $titleArr = explode("-", $title);
    $category = end($titleArr);
    $apiCategoryList = getlist($category);
}
?>
<div class="apiContent container-fluid">
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header">
					<small><?php 
echo toTitle($category);
?>
 APIs</small>
				</h1>
			<div class="navigation">
				<ul class="list-group linkList">
					<?php 
if (count($apiCategoryList) > 0) {
开发者ID:OpenLogiks,项目名称:APIDocs,代码行数:31,代码来源:list.php

示例9: exit

<?php

if (!defined('ROOT')) {
    exit('No direct script access allowed');
}
loadModuleLib('guides', 'api');
if (isset($_REQUEST["action"])) {
    switch ($_REQUEST["action"]) {
        case "fetch-list":
            if (isset($_REQUEST['category'])) {
                $guides_list = getlist($_REQUEST['category']);
                printServiceMsg($guides_list);
            } else {
                printServiceMsg(array());
            }
            break;
        case "fetch-category":
            $guides_cat = getCategory();
            printServiceMsg($guides_cat);
            break;
        case "search-list":
            if (isset($_REQUEST['q'])) {
                $api_list = searchList($_REQUEST['q']);
                printServiceMsg($api_list);
            } else {
                printServiceMsg(array());
            }
            break;
        case "create-guide":
            checkServiceSession();
            $status = saveGuide();
开发者ID:OpenLogiks,项目名称:APIDocs,代码行数:31,代码来源:service.php

示例10: checkLogin

<?php

checkLogin();
$res = getlist('category', 0, 100, '*', 'pid=0');
if (!empty($_POST)) {
    $res = insert('category', $_POST);
    if (!empty($res)) {
        header('Location:' . ROOT . 'index.php?c=category&a=index&admin=1');
    } else {
        die('修改失败');
    }
}
view(array('res' => $res));
开发者ID:usingsth,项目名称:usingcms,代码行数:13,代码来源:insert.php

示例11: print_scripts


//.........这里部分代码省略.........
            }
            if ($nmonths[1] == 1) {
                $nmonths[2] = "false";
            }
            if ($nmonths[4] != 'new_window') {
                $nmonths[4] = 1;
            } else {
                $nmonths[4] = 0;
            }
        } else {
            $view = array();
            $view[] = (int) $matches[2][0] == 1 ? "true" : "false";
            $view[] = (int) $matches[2][1] == 1 ? "true" : "false";
            $view[] = (int) $matches[2][2] == 1 ? "true" : "false";
            $view[] = (int) $matches[2][3] == 1 ? "true" : "false";
            $view[] = (int) $matches[2][4] == 1 ? "true" : "false";
            $buttons = array();
            $buttons[] = (int) $matches[7][0] == 1 ? "true" : "false";
            $buttons[] = (int) $matches[7][1] == 1 ? "true" : "false";
            $buttons[] = (int) $matches[7][2] == 1 ? "true" : "false";
            $edition = $edition == "1" ? "true" : "false";
            $nmonths = array();
            $nmonths[] = (int) $matches[9] == 1 ? "true" : "false";
            $nmonths[] = (string) $matches[10] != "mouseover" ? "1" : "0";
            $nmonths[] = (int) $matches[11] == 1 ? "true" : "false";
            $nmonths[] = $matches[13];
            $nmonths[] = (string) $matches[12] != "new_window" ? "1" : "0";
        }
        $otherparams = trim($otherparamsvalue);
        $otherparams = str_replace("\n", "", $otherparams);
        $otherparams = str_replace("\r", "", $otherparams);
        $newp = "";
        if ($otherparams != "") {
            $p = explode(",", $otherparams);
            for ($i = 0; $i < count($p); $i++) {
                if (trim($p[$i]) != "") {
                    $newp .= ", " . $p[$i];
                }
            }
        }
        $user =& JFactory::getUser();
        $db =& JFactory::getDBO();
        $db->setQuery('SELECT * FROM #__dc_mv_calendars where id=' . $id);
        $rows = $db->loadObjectList();
        if (count($rows) > 0) {
            $p = explode(";", $rows[0]->permissions);
            if (isValid($p[0], $p[1], $user->getAuthorisedGroups(), $user->id)) {
                $newp .= ", userAdd:true";
            } else {
                $newp .= ", userAdd:false";
            }
            if (isValid($p[2], $p[3], $user->getAuthorisedGroups(), $user->id)) {
                $newp .= ", userEdit:true";
            } else {
                $newp .= ", userEdit:false";
            }
            if (isValid($p[4], $p[5], $user->getAuthorisedGroups(), $user->id)) {
                $newp .= ", userDel:true";
            } else {
                $newp .= ", userDel:false";
            }
            if (isValidOwner($p[2])) {
                $newp .= ", userEditOwner:true";
            } else {
                $newp .= ", userEditOwner:false";
            }
            if (isValidOwner($p[4])) {
                $newp .= ", userDelOwner:true";
            } else {
                $newp .= ", userDelOwner:false";
            }
            $newp .= ", userOwner:" . $user->id . "";
        }
        $db->setQuery("select * from #__dc_mv_configuration where id=1");
        $configuration = $db->loadObjectList();
        $administration = unserialize($configuration[0]->administration);
        $palettes = unserialize($configuration[0]->palettes);
        if (count($palettes) > $palette) {
            $newp .= ", palette:" . $palette . "";
            $newp .= ", paletteDefault:\"" . $palettes[$palette]["default"] . "\"";
        }
        $document->addScriptDeclaration(getlist("dc_subjects", $rows[0]->subjectlist, $administration["subjectlist"]) . getlist("dc_locations", $rows[0]->locationlist, $administration["locationlist"]));
        $p = parse_url(JURI::root());
        if (strlen($p["path"]) > 0 && $p["path"][strlen($p["path"]) - 1] == "/") {
            $p["path"] = substr($p["path"], 0, strlen($p["path"]) - 1);
        }
        $path = $p["path"];
        $showtooltipdwm_mouseover = "false";
        $showtooltipdwm = "false";
        if ($nmonths[0] == 'true') {
            if ($nmonths[1] != 1) {
                $showtooltipdwm_mouseover = 'true';
            } else {
                $showtooltipdwm = 'true';
            }
        }
        $document->addScriptDeclaration("initMultiViewCal(\"" . $container . "\"," . $id . ",{viewDay:" . $view[0] . ",viewWeek:" . $view[1] . ",viewMonth:" . $view[2] . ",viewNMonth:" . $view[3] . ",viewList:" . $view[4] . ",viewdefault:\"" . $viewdefault . "\",numberOfMonths:" . $numberOfMonths . ",showtooltip:" . $nmonths[0] . ",tooltipon:" . $nmonths[1] . ",shownavigate:" . $nmonths[2] . ",url:\"" . $nmonths[3] . "\",target:" . $nmonths[4] . ",showtooltipdwm_mouseover:" . $showtooltipdwm_mouseover . ",showtooltipdwm:" . $showtooltipdwm . ",start_weekday:" . $start_weekday . ",language:\"" . $language . "\",cssStyle:\"" . $style . "\",edition:" . $edition . ",btoday:" . $buttons[0] . ",bnavigation:" . $buttons[1] . ",brefresh:" . $buttons[2] . ",bnew:" . $edition . ",path:\"" . $path . "/\"" . $newp . "});");
    }
    return $msg;
}
开发者ID:richardgarcia7,项目名称:apc-softdev-gd121mi122-06,代码行数:101,代码来源:list.inc.php

示例12: listing_page

function listing_page($message = null)
{
    global $self, $directory, $sort, $reverse;
    html_header();
    $list = getlist($directory);
    if (array_key_exists('sort', $_GET)) {
        $sort = $_GET['sort'];
    } else {
        $sort = 'filename';
    }
    if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') {
        $reverse = true;
    } else {
        $reverse = false;
    }
    $list = sortlist($list, $sort, $reverse);
    echo '<h1 style="margin-bottom: 0">Web File Browser (webadmin.php)</h1>

<form enctype="multipart/form-data" action="' . $self . '" method="post">

<table id="main">
';
    directory_choice();
    if (!empty($message)) {
        spacer();
        echo $message;
    }
    if (@is_writable($directory)) {
        upload_box();
        create_box();
    } else {
        spacer();
    }
    if ($list) {
        listing($list);
    } else {
        echo error('not_readable', $directory);
    }
    echo '</table>

</form>

';
    html_footer();
}
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:45,代码来源:browser.php

示例13: json_encode

</div>

<div class="container-fluid bg-3 text-center">
   <head>
        <meta charset="utf-8">
        <title>jQuery UI Autocomplete - Default functionality</title>
        <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
        <!-- <script src="//code.jquery.com/jquery-1.10.2.js"></script> -->
        <script src="//code.jquery.com/jquery-1.9.1.js"></script>
       <!--  // <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> -->
        <script src="//code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
        <script>
            $(function() {
                //console.log("hey");
                var obj = '<?php 
echo json_encode(getlist());
?>
';
                var items = JSON.parse(obj);
                var availableTags = items;
                $( "#tags" ).autocomplete({
                    source: availableTags
                });
            });
            $(document).ready(function () {
            $('#tags').on('change', function () {
                $('#tagsname').html('You selected: ' + this.value);
            }).change();
            $('#tags').on('autocompleteselect', function (e, ui) {
                $('#tagsname').html('You selected: ' + ui.item.value);
                var songname = ui.item.value;
开发者ID:js345,项目名称:RadioHub,代码行数:31,代码来源:changePreference.php

示例14: checkLogin

<?php

checkLogin();
$pid = $_GET['pid'] >= 0 ? $_GET['pid'] : die('非法id');
$res = getlist('category', 0, 100, '*', 'pid=' . $pid);
echo json_encode($res);
return false;
开发者ID:usingsth,项目名称:usingcms,代码行数:7,代码来源:next.php

示例15: exit

<?php

if (!defined('ROOT')) {
    exit('No direct script access allowed');
}
loadModuleLib('api', 'api');
if (isset($_REQUEST["action"])) {
    switch ($_REQUEST["action"]) {
        case "fetch-list":
            if (isset($_REQUEST['category'])) {
                $api_list = getlist($_REQUEST['category']);
                printServiceMsg($api_list);
            } else {
                printServiceMsg(array());
            }
            break;
        case "fetch-category":
            $api_cat = getCategory();
            printServiceMsg($api_cat);
            break;
        case "search-list":
            if (isset($_REQUEST['q'])) {
                $api_list = searchList($_REQUEST['q']);
                printServiceMsg($api_list);
            } else {
                printServiceMsg(array());
            }
            break;
        case "create-api":
            checkServiceSession();
            $status = saveApi();
开发者ID:OpenLogiks,项目名称:APIDocs,代码行数:31,代码来源:service.php


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