本文整理汇总了PHP中showlist函数的典型用法代码示例。如果您正苦于以下问题:PHP showlist函数的具体用法?PHP showlist怎么用?PHP showlist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showlist函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteselected
function deleteselected()
{
$groupids = $_POST["groupids"];
$inTemp = "";
foreach ($groupids as $groupid) {
$inTemp = $inTemp . $groupid . ",";
}
$in = substr($inTemp, 0, strlen($inTemp) - 1);
if ($inTemp != "") {
global $db;
$sql = "delete from wx_group_info where id in (" . $in . ")";
//echo "===>sql".$sql;
$db->exec($sql);
$sql = "update wx_group_user set groupid=null, userisin='1' where groupid in (" . $in . ")";
$db->exec($sql);
// 删除后,重新再查一遍
showlist();
}
}
示例2: reply
function reply()
{
// msgid 是回复的目标消息id 对应表 的 replyid
$msgid = $_POST["msgid"];
if (empty($msgid)) {
return;
}
$content = $_POST["content"];
if (empty($content)) {
return;
}
$openid = $_POST["createby"];
if (empty($openid)) {
return;
}
// 回复消息要做2件事
// 1 调微信接口
$paramContent = array();
$contentTemp = array("content" => "管理员回复:\r\n" . $content);
$paramContent = array("msgtype" => "text", "text" => $contentTemp);
$data = JsonUtil::getJsonStrFromArray(array_merge($paramContent, array("touser" => $openid)));
//LogUtil::logs("queryGroupUserAndReplyMsg data ====>".$data, getLogFile("/business.log"));
$tp = new TypeParent();
$response = $tp->sendMsgByService($data);
if ($response["errcode"] == 0) {
// 回复成功
// 2 保存回复的消息
$msgtype = "1";
// 消息类型: 0表示用户发送 1表示管理员回复 2表示管理员群发消息 3 自动回复 4聊天室信息
$status = "0";
// 消息状态 :0: 消息发送成功 1: 发送中 2 发送失败, 保存成功 3 发送成功, 保存失败 4 表示这条信息是用户送的,并且已经得到回复
$createtime = DateUtil::getCurrentTime();
$createby = $_SESSION['cn_sysadmin']['user_id'];
// 消息类型: 0表示用户发送 1表示管理员回复 2表示管理员群发消息 3 自动回复 4聊天室信息
DBUtil::saveMsg($createby, $content, $createtime, $msgid, $msgtype, $status);
// 原来设计是将状态改为4用来标识已回复,现在能查到回复内容,就取消这个方案了
// $sql = "update wx_user_msg set status = '4' where id ='$msgid'";
// DBUtil::updateMsg($sql);
}
showlist();
}
示例3: dirname
include_once dirname(__FILE__) . '/ressources/class.system.network.inc';
include_once dirname(__FILE__) . "/framework/class.settings.inc";
include_once dirname(__FILE__) . "/ressources/class.mysql-meta.inc";
}
}
include_once 'ressources/class.templates.inc';
include_once 'ressources/class.html.pages.inc';
include_once 'ressources/class.highcharts.inc';
include_once dirname(__FILE__) . '/ressources/class.users.menus.inc';
include_once dirname(__FILE__) . '/ressources/class.mysql.inc';
if (isset($_GET["popup"])) {
popup();
exit;
}
if (isset($_GET["list"])) {
showlist();
exit;
}
js();
function js()
{
//callback
header("content-type: application/x-javascript");
$tpl = new templates();
$page = CurrentPageName();
if (isset($_GET["callback"])) {
$callback = "&callback={$_GET["callback"]}";
}
$title = $tpl->_ENGINE_parse_body("{proxy_clients}");
$html = "YahooWin6('850','{$page}?popup=yes{$callback}','{$title}')";
echo $html;
示例4: usersMenus
include_once(dirname(__FILE__)."/framework/class.settings.inc");
}}
include_once('ressources/class.templates.inc');
include_once('ressources/class.html.pages.inc');
include_once('ressources/class.mysql.inc');
include_once('ressources/class.artica.graphs.inc');
include_once('ressources/class.highcharts.inc');
$users=new usersMenus();
if(!$users->AsWebStatisticsAdministrator){
echo FATAL_ERROR_SHOW_128("{ERROR_NO_PRIVS}");
die();
}
if(isset($_GET["list"])){showlist();exit;}
table();
function table(){
$tpl=new templates();
$page=CurrentPageName();
$ipaddr=$tpl->javascript_parse_text("{ipaddr}");
$mac=$tpl->javascript_parse_text("{MAC}");
$familysite=$tpl->javascript_parse_text("{familysite}");
$category=$tpl->javascript_parse_text("{category}");
$uid=$tpl->javascript_parse_text("{uid}");
$size=$tpl->javascript_parse_text("{size}");
$hits=$tpl->javascript_parse_text("{hits}");
$hour=$tpl->javascript_parse_text("{hour}");
示例5: showlist
function showlist($path)
{
global $ignore, $ignore_dirs, $id, $divs, $imgpath, $types, $startin;
$dirs = array();
$files = array();
if (is_dir($path)) {
if ($dir = @opendir($path)) {
//if(!in_dirs($path, $ignore_dirs)){
while (($file = readdir($dir)) !== false) {
if ($file != "." && $file != ".." && !in_array($file, $ignore)) {
if (is_dir("{$path}/{$file}")) {
if (file_exists("{$path}/{$file}/index.php")) {
$dirs[$file] = getTitle("{$path}/{$file}/index.php");
} elseif (file_exists("{$path}/{$file}/index.html")) {
$dirs[$file] = getTitle("{$path}/{$file}/index.html");
} elseif (file_exists("{$path}/{$file}/index.htm")) {
$dirs[$file] = getTitle("{$path}/{$file}/index.htm");
} else {
$dirs[$file] = $file;
}
} else {
if (ereg("{$types}\$", $file)) {
$files[$file] = getTitle("{$path}/{$file}");
if (strlen($files[$file]) == 0) {
$files[$file] = $file;
}
}
}
}
}
//}
closedir($dir);
}
natcasesort($dirs);
$url = str_replace($_SERVER['DOCUMENT_ROOT'], "", $path);
$n = substr_count("{$url}/\$", "/");
$base = substr_count($startin, "/") + 1;
$indent = str_pad("", $n - 1, "\t");
echo "{$indent}<ul id=\"list{$id}\">\n";
if ($n > $base) {
$divs[] = "{$id}";
}
$imgsrc = "minus";
foreach ($dirs as $d => $t) {
$id++;
/*echo "$indent\t<li><a href=\"javascript:toggle('list$id','img$id')\"><img src=\"$imgpath/$imgsrc.gif\" id=\"img$id\" align=\"middle\" border=\"0\" alt=\"\" /></a>";
echo "<img src=\"$imgpath/folder.gif\" alt=\"\" align=\"middle\" />";
echo " <strong><a href=\"$url/$d/\">$t</a></strong>\n";
showlist("$path/$d");
echo "$indent\t</li>\n";*/
echo "{$indent}\t<li><a href=\"javascript:toggle('list{$id}','img{$id}')\"><img src=\"{$imgpath}/{$imgsrc}.gif\" id=\"img{$id}\" align=\"middle\" border=\"0\" alt=\"\" /></a>";
echo "";
echo " <strong>{$t}</strong>\n";
showlist("{$path}/{$d}");
echo "{$indent}\t</li>\n";
}
natcasesort($files);
$id++;
foreach ($files as $f => $t) {
$f = retira_extensao($f);
/*echo "$indent\t<li><img style=\"padding-left:20px;\" src=\"$imgpath/html.gif\" alt=\"\" border=\"0\" /> <a href=\"$url/$f\">$t</a></li>\n";*/
echo "{$indent}\t<li><a href=\"{$url}/{$f}\">{$t}</a></li>\n";
}
echo "{$indent}</ul>\n";
}
}
示例6: prayerlist_mod
function prayerlist_mod($perpage)
{
global $list_prefix;
//this is a module so we should already know if the user is logged in.
//start main code here.
//lets search for request that expire prior to right now.
$sql = "SELECT * FROM " . $list_prefix . "prayer_list WHERE `expired` = '0' AND `expiredate` < '" . time() . "';";
$result = db_query($sql);
@($rows = db_num_rows($result));
$j = 0;
while ($j < $rows) {
$row = db_fetch_array($result);
//mail the user here if they are not anonymous
if (0 != strcmp($row['requested_by'], 'anonymous')) {
mailuser($row['requested_by'], $row);
}
//We need to change this to make the request historical rather than deleting it.
$sql = "UPDATE " . $list_prefix . "prayer_list SET `expired` = '1' WHERE `id`='" . $row['id'] . "';";
//end of change.
$result2 = db_query($sql);
$j++;
}
$MOD['title'] = "Prayer Request";
$MOD['content'] = showlist($perpage);
return $MOD;
}
示例7: foreach
}
}
foreach ($seotypes as $type => $subtypes) {
echo '<div id="' . $type . '"' . ($_G['gp_anchor'] != $type ? ' style="display: none"' : '') . '>';
showtips(cplang('setting_seo_global_tips') . cplang('setting_seo_' . $type . '_tips'), 'tips_' . $type);
showtableheader();
foreach ($subtypes as $subtype) {
showtitle(cplang('setting_seo_' . $subtype) . ($subtype == 'threadlist' || $subtype == 'articlelist' ? ' <a href="javascript:;" class="act" onclick="if($(\'' . $subtype . '_detail\').style.display){$(\'' . $subtype . '_detail\').style.display=\'\';this.innerHTML=\'' . cplang('setting_seo_closedetail') . '\';}else{$(\'' . $subtype . '_detail\').style.display=\'none\';this.innerHTML=\'' . cplang('setting_seo_opendetail') . '\';};return false;">' . cplang('setting_seo_opendetail') . '</a>' : ''));
showtablerow('', array('width="12%"', ''), array(cplang('setting_seo_seotitle'), '<input type="text" id="t_' . $type . $subtype . '" onfocus="getcodetext(this, \'' . $subtype . '\');" name="settingnew[seotitle][' . $subtype . ']" value="' . htmlspecialchars($setting['seotitle'][$subtype]) . '" class="txt" style="width:280px;" />'));
showtablerow('', array('width="12%"', ''), array(cplang('setting_seo_seokeywords'), '<input type="text" id="k_' . $type . $subtype . '" onfocus="getcodetext(this, \'' . $subtype . '\');" name="settingnew[seokeywords][' . $subtype . ']" value="' . htmlspecialchars($setting['seokeywords'][$subtype]) . '" class="txt" style="width:280px;" />'));
showtablerow('', array('width="12%"', ''), array(cplang('setting_seo_seodescription'), '<input type="text" id="d_' . $type . $subtype . '" onfocus="getcodetext(this, \'' . $subtype . '\');" name="settingnew[seodescription][' . $subtype . ']" value="' . htmlspecialchars($setting['seodescription'][$subtype]) . '" class="txt" style="width:280px;" />'));
if ($subtype == 'threadlist') {
showlist($first, $seconds, $thirds, $subtype);
}
if ($subtype == 'articlelist') {
showlist($afirst, $aseconds, $athirds, $subtype);
}
}
showtablefooter();
echo '</div>';
}
showtagfooter('tbody');
} elseif ($operation == 'cachethread') {
include_once libfile('function/forumlist');
$forumselect = '<select name="fids[]" multiple="multiple" size="10"><option value="all">' . $lang['all'] . '</option><option value=""> </option>' . forumselect(FALSE, 0, 0, TRUE) . '</select>';
showtableheader();
showtitle('setting_cachethread');
showsetting('setting_cachethread_indexlife', 'settingnew[cacheindexlife]', $setting['cacheindexlife'], 'text');
showsetting('setting_cachethread_life', 'settingnew[cachethreadlife]', $setting['cachethreadlife'], 'text');
showsetting('setting_cachethread_dir', 'settingnew[cachethreaddir]', $setting['cachethreaddir'], 'text');
showtitle('setting_cachethread_coefficient_set');
示例8: action_pluginoptions
/**
* @todo document this
*/
function action_pluginoptions($message = '')
{
global $member, $manager;
// check if allowed
$member->isAdmin() or $this->disallow();
$pid = intRequestVar('plugid');
if (!$manager->pidInstalled($pid)) {
$this->error(_ERROR_NOSUCHPLUGIN);
}
$extrahead = '<script type="text/javascript" src="javascript/numbercheck.js"></script>';
$pluginName = htmlspecialchars(getPluginNameFromPid($pid), ENT_QUOTES);
$this->pagehead($extrahead);
?>
<p><a href="index.php?action=pluginlist">(<?php
echo _PLUGS_BACK;
?>
)</a></p>
<h2><?php
echo sprintf(_PLUGIN_OPTIONS_TITLE, $pluginName);
?>
</h2>
<?php
if ($message) {
echo $message;
}
?>
<form action="index.php" method="post">
<div>
<input type="hidden" name="action" value="pluginoptionsupdate" />
<input type="hidden" name="plugid" value="<?php
echo $pid;
?>
" />
<?php
$manager->addTicketHidden();
$aOptions = array();
$aOIDs = array();
$query = 'SELECT * FROM ' . sql_table('plugin_option_desc') . ' WHERE ocontext=\'global\' and opid=' . $pid . ' ORDER BY oid ASC';
$r = sql_query($query);
while ($o = sql_fetch_object($r)) {
array_push($aOIDs, $o->oid);
$aOptions[$o->oid] = array('oid' => $o->oid, 'value' => $o->odef, 'name' => $o->oname, 'description' => $o->odesc, 'type' => $o->otype, 'typeinfo' => $o->oextra, 'contextid' => 0);
}
// fill out actual values
if (count($aOIDs) > 0) {
$r = sql_query('SELECT oid, ovalue FROM ' . sql_table('plugin_option') . ' WHERE oid in (' . implode(',', $aOIDs) . ')');
while ($o = sql_fetch_object($r)) {
$aOptions[$o->oid]['value'] = $o->ovalue;
}
}
// call plugins
$manager->notify('PrePluginOptionsEdit', array('context' => 'global', 'plugid' => $pid, 'options' => &$aOptions));
$template['content'] = 'plugoptionlist';
$amount = showlist($aOptions, 'table', $template);
if ($amount == 0) {
echo '<p>', _ERROR_NOPLUGOPTIONS, '</p>';
}
?>
</div>
</form>
<?php
$this->pagefoot();
}
示例9: list_output_dynamic
function list_output_dynamic(&$udm, &$options)
{
$list_html_start .= '<center><table cellpadding="1" cellspacing="1" width="95%">';
$list_html_start .= '<tr class="toplinks">';
if ($udm->results != NULL) {
//DISPLAY COLUMN HEADERS
$column_count = 0;
foreach ($udm->results[0] as $current_field => $field_value) {
if (substr($current_field, 0, 5) != "hide_") {
//hide sort fields and editlink fields
$list_html_headers .= "<td align=\"left\">";
//Each field is linked to change the sort_by value and submit the form
if ($current_field == "Name") {
//hack for name field to sort properly
$list_html_headers .= "<b><a href=\"javascript: document.forms['" . $options['list_form'] . "'].elements['UDM_sort'].value = 'Last_Name, First_Name, '+document.forms['" . $options['list_form'] . "'].elements['UDM_sort'].value; document.forms['" . $options['list_form'] . "'].submit();\">" . list_translateFields($current_field, $udm, $options) . "</a></b>";
} else {
//standard column header
$list_html_headers .= "<b><a href=\"javascript: document.forms['" . $options['list_form'] . "'].elements['UDM_sort'].value = '{$current_field}, '+document.forms['" . $options['list_form'] . "'].elements['UDM_sort'].value; document.forms['" . $options['list_form'] . "'].submit();\">" . list_translateFields($current_field, $udm, $options) . "</a></b>";
}
$column_count++;
$list_html_headers .= "</td>";
}
}
if ($options['allow_edit']) {
//include columns for checkbox and editlink values
$list_html_headers = "<td align=\"left\"><a href=\"javascript: list_selectall();\"><B>All</B></a></td>" . $list_html_headers . "<td></td>";
$column_count = $column_count + 2;
}
$list_html_start .= $list_html_headers . "</tr>";
$list_html = showlist($udm, $options);
}
$list_html_footer = "</table></center>";
//INSERT PAGINATION
$list_html_start = list_pagination_header($udm, $options) . $list_html_start;
$list_html_footer .= list_pagination_header($udm, $options + array('show_advanced_links' => true));
//INSERT action bar
if ($options['allow_edit'] && $options['show_action_bar']) {
$list_html_start = list_action_bar($options) . "\n " . $list_html_start;
}
//INSERT modin selectbox
if ($options['show_advanced_modin']) {
$list_html_footer .= list_include_modin_box($udm, $options);
}
//INSERT LIST ACTION OPTIONS
#$options_html="<div class=\"side\" style=\"float:right;\"><form name='export_button' action='export4.php?id=".$udm->instance."' method='POST'><input type=\"hidden\" name=\"sqlsend\" value=\" FROM userdata WHERE modin=".$udm->instance."\"><a href=\"#\" onclick=\"checkSave();\">Save This Search</a> | <a href=\"#\" onclick=\"document.forms['export_button'].submit();\">Export List</a></form></div><BR>";
#$list_html_start=$options_html.$list_html_start;
return $list_html_start . $list_html . $list_html_footer;
}
示例10: addtogroup
function addtogroup()
{
$groupid = $_POST["groupid"];
$openids = $_POST["openid"];
global $db;
$groupInfo = $db->fetch($db->query("select groupname from wx_group_info where id ='{$groupid}' "));
//var_dump($groupInfo);
$groupname = $groupInfo["groupname"];
$createtime = DateUtil::getCurrentTime();
$createby = $_SESSION['cn_sysadmin']['user_id'];
$userisin = "1";
// 先判断是有否存在的记录
$inTemp = "";
foreach ($openids as $openid) {
$inTemp = $inTemp . "'" . $openid . "',";
}
$in = substr($inTemp, 0, strlen($inTemp) - 1);
// 先删除openid
$db->exec("delete from wx_group_user where openid in (" . $in . ") ");
foreach ($openids as $openid) {
$sql = "insert into wx_group_user (groupid, openid, groupname, createtime, createby, userisin) values (\r\n\t\t'{$groupid}', '{$openid}', '{$groupname}', '{$createtime}', '{$createby}', '{$userisin}'\r\n\t\t)";
$db->exec($sql);
}
// 重新再查一遍
showlist();
}
示例11: sendTrackEmail
}
}
function sendTrackEmail($userEmail, $userName, $trackString)
{
$emailString = "Hi " . $userName . ",<br /><br /> Here is your GuideDog tracks for today. (Click to download)<br /><br />" . $trackString . "<br /><br />Access full Guide Dogs Tracks list from <a href='http://www.hotdogs.com.au/guide-dogs' target='_blank'>here</a>" . "<br /><br />Thank you<br /><br />John Pearson<br /><a href='http://hotdogs.com.au' target='_blank'>Hotdogs.com.au</a>";
//change this to your email.
$to = $userEmail;
$from = "info@hotdogs.com.au";
$subject = "Daily Tracks from Hotdogs.com.au";
//begin of HTML message
$message = '
<html>
<body bgcolor="#DCEEFC" style="font-family:Verdana, Verdana, Geneva, sans-serif; font-size:12px;">' . $emailString . '</body>
</html>';
//end of message
$headers = "From: {$from}\r\n";
$headers .= "Content-type: text/html\r\n";
//options to send to cc+bcc
//$headers .= "Cc: [email]maa@p-i-s.cXom[/email]";
//$headers .= "Bcc: [email]email@maaking.cXom[/email]";
// now lets send the email.
//mail($to, $subject, $message, $headers);
//echo "Message has been sent....!<br />";
}
$dirpath = "/uploads/guidedogs/";
$fpath = $_SERVER['DOCUMENT_ROOT'] . $dirpath;
///home/hotdogsc/public_html/uploads/puntersclub/HotDogSMSTHU.csv
showlist($fpath);
?>
示例12: showlist
function showlist($files, $nowfilepath, $project, $path)
{
echo '<ul class="dir2">';
if ($files) {
foreach ($files as $k => $v) {
if (is_array($v) || $v === true) {
$itempath = substr($k, strlen($path . '/'));
if (!$itempath) {
continue;
}
echo '<li class="dir2">';
if ($k == $nowfilepath) {
echo '<b>' . $itempath . '</b>';
} else {
echo '<a href="' . Docs::url($k, true, true) . '">' . substr($k, strlen($path . '/')) . '</a>';
}
if (is_array($v)) {
showlist($v, $nowfilepath, $project, $path . '/' . $itempath);
}
echo '</li>';
} else {
$fname = substr($k, strlen($path . '/'));
if ($k == $nowfilepath) {
echo '<li class="phpfile"><b>' . $fname . '</b></li>';
} else {
echo '<li class="phpfile"><a href="' . Docs::url($k, true, true) . '">' . $fname . '</a></li>';
}
}
}
}
echo '</ul>';
}
示例13: join
break;
}
}
$types = join($types, "|");
$types = "({$types})";
if (!is_array($htmltypes)) {
$htmltypes = array();
}
if (count($htmltypes) == 0) {
$htmltypes = $types;
}
if (!$imgpath) {
$imgpath = ".";
}
cria_estrutura_arquivo();
showlist($_SERVER['DOCUMENT_ROOT'] . "{$startin}");
if (is_array($divs)) {
$divs = "'" . join($divs, "','") . "'";
}
function showlist($path)
{
global $ignore, $ignore_dirs, $id, $divs, $imgpath, $types, $startin, $url_domain;
$dirs = array();
$files = array();
if (is_dir($path)) {
if ($dir = @opendir($path)) {
//if(!in_dirs($path, $ignore_dirs)){
while (($file = readdir($dir)) !== false) {
if ($file != "." && $file != ".." && !in_array($file, $ignore)) {
if (is_dir("{$path}/{$file}")) {
if (file_exists("{$path}/{$file}/index.php")) {