本文整理汇总了PHP中show_all函数的典型用法代码示例。如果您正苦于以下问题:PHP show_all函数的具体用法?PHP show_all怎么用?PHP show_all使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_all函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
$month = _AUGUST;
} elseif ($getdate[2] == "09") {
$month = _SEPTEMBER;
} elseif ($getdate[2] == "10") {
$month = _OCTOBER;
} elseif ($getdate[2] == "11") {
$month = _NOVEMBER;
} elseif ($getdate[2] == "12") {
$month = _DECEMBER;
}
if ($month != $thismonth) {
$year = $getdate[1];
echo "<li><a href=\"modules.php?name={$module_name}&sa=show_month&year={$year}&month={$getdate['2']}&month_l={$month}\">{$month}, {$year}</a>";
$thismonth = $month;
}
}
echo "</ul><br><br><center>" . "<form action=\"modules.php?name=Search\" method=\"post\">" . "<input type=\"text\" name=\"query\" size=\"30\"> " . "<input type=\"submit\" value=\"" . _SEARCH . "\">" . "</form>" . "[ <a href=\"modules.php?name={$module_name}\">Stories Archive Index</a> ]</center>";
CloseTable();
include "footer.php";
}
switch ($sa) {
case "show_all":
show_all($min);
break;
case "show_month":
show_month($year, $month, $month_l);
break;
default:
select_month();
break;
}
示例2: get_service_list_values
function get_service_list_values($id, $modulename, $sessionid, $only_mine = 'true')
{
require_once 'modules/Services/Services.php';
require_once 'include/utils/UserInfoUtil.php';
$adb = PearDatabase::getInstance();
$log = vglobal('log');
$log->debug("Entering customer portal Function get_service_list_values");
$check = checkModuleActive($modulename);
if ($check == false) {
return array("#MODULE INACTIVE#");
}
$user = new Users();
$userid = getPortalUserid();
$current_user = $user->retrieveCurrentUserInfoFromFile($userid);
//To avoid SQL injection we are type casting as well as bound the id variable
$id = (int) vtlib_purify($id);
$entity_ids_list = array();
$show_all = show_all($modulename);
if (!validateSession($id, $sessionid)) {
return null;
}
if ($only_mine == 'true' || $show_all == 'false') {
array_push($entity_ids_list, $id);
} else {
$contactquery = "SELECT contactid, parentid FROM vtiger_contactdetails " . " INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid" . " AND vtiger_crmentity.deleted = 0 " . " WHERE (parentid = (SELECT parentid FROM vtiger_contactdetails WHERE contactid = ?) AND parentid != 0) OR contactid = ?";
$contactres = $adb->pquery($contactquery, array($id, $id));
$no_of_cont = $adb->num_rows($contactres);
for ($i = 0; $i < $no_of_cont; $i++) {
$cont_id = $adb->query_result($contactres, $i, 'contactid');
$acc_id = $adb->query_result($contactres, $i, 'parentid');
if (!in_array($cont_id, $entity_ids_list)) {
$entity_ids_list[] = $cont_id;
}
if (!in_array($acc_id, $entity_ids_list) && $acc_id != '0') {
$entity_ids_list[] = $acc_id;
}
}
}
$focus = new Services();
$focus->filterInactiveFields('Services');
foreach ($focus->list_fields as $fieldlabel => $values) {
foreach ($values as $table => $fieldname) {
$fields_list[$fieldlabel] = $fieldname;
}
}
$fields_list['Related To'] = 'entityid';
$query = array();
$params = array();
$query[] = "select vtiger_service.*," . "case when vtiger_crmentityrel.crmid != vtiger_service.serviceid then vtiger_crmentityrel.crmid else vtiger_crmentityrel.relcrmid end as entityid, " . "'' as setype from vtiger_service " . "inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_service.serviceid " . "left join vtiger_crmentityrel on (vtiger_crmentityrel.relcrmid=vtiger_service.serviceid or vtiger_crmentityrel.crmid=vtiger_service.serviceid) " . "where vtiger_crmentity.deleted = 0 and " . "( vtiger_crmentityrel.crmid in (" . generateQuestionMarks($entity_ids_list) . ") OR " . "(vtiger_crmentityrel.relcrmid in (" . generateQuestionMarks($entity_ids_list) . ") AND vtiger_crmentityrel.module = 'Services')" . ")";
$params[] = array($entity_ids_list, $entity_ids_list);
$checkQuotes = checkModuleActive('Quotes');
if ($checkQuotes == true) {
$query[] = "select distinct vtiger_service.*,\n\t\t\tvtiger_quotes.accountid as entityid,\n\t\t\t'Accounts' as setype\n\t\t\tfrom vtiger_quotes INNER join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_quotes.quoteid\n\t\t\tleft join vtiger_inventoryproductrel on vtiger_inventoryproductrel.id=vtiger_quotes.quoteid\n\t\t\tleft join vtiger_service on vtiger_service.serviceid = vtiger_inventoryproductrel.productid\n\t\t\twhere vtiger_inventoryproductrel.productid = vtiger_service.serviceid AND vtiger_crmentity.deleted=0 and accountid in (" . generateQuestionMarks($entity_ids_list) . ")";
$params[] = array($entity_ids_list);
}
$checkInvoices = checkModuleActive('Invoice');
if ($checkInvoices == true) {
$query[] = "select distinct vtiger_service.*, vtiger_invoice.accountid as entityid, 'Accounts' as setype\n\t\t\tfrom vtiger_invoice\n\t\t\tINNER join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_invoice.invoiceid\n\t\t\tleft join vtiger_inventoryproductrel on vtiger_inventoryproductrel.id=vtiger_invoice.invoiceid\n\t\t\tleft join vtiger_service on vtiger_service.serviceid = vtiger_inventoryproductrel.productid\n\t\t\twhere vtiger_inventoryproductrel.productid = vtiger_service.serviceid AND vtiger_crmentity.deleted=0 and accountid in (" . generateQuestionMarks($entity_ids_list) . ")";
$params[] = array($entity_ids_list, $entity_ids_list);
}
$ServicesfieldVisibilityPermissions = array();
foreach ($fields_list as $fieldlabel => $fieldname) {
$ServicesfieldVisibilityPermissions[$fieldname] = getFieldVisibilityPermission('Services', $current_user->id, $fieldname);
}
$fieldValuesToRound = array('unit_price', 'commissionrate');
for ($k = 0; $k < count($query); $k++) {
$res[$k] = $adb->pquery($query[$k], $params[$k]);
$noofdata[$k] = $adb->num_rows($res[$k]);
if ($noofdata[$k] == 0) {
$output[$k][$modulename]['data'] = '';
}
for ($j = 0; $j < $noofdata[$k]; $j++) {
$i = 0;
foreach ($fields_list as $fieldlabel => $fieldname) {
$fieldper = $ServicesfieldVisibilityPermissions[$fieldname];
if ($fieldper == '1' && $fieldname != 'entityid') {
continue;
}
$output[$k][$modulename]['head'][0][$i]['fielddata'] = Vtiger_Language_Handler::getTranslatedString($fieldlabel, 'Services', vglobal('default_language'));
$fieldvalue = $adb->query_result($res[$k], $j, $fieldname);
$fieldid = $adb->query_result($res[$k], $j, 'serviceid');
if (in_array($fieldname, $fieldValuesToRound)) {
$fieldvalue = round($fieldvalue, 2);
}
if ($fieldname == 'entityid') {
$crmid = $fieldvalue;
$module = $adb->query_result($res[$k], $j, 'setype');
if ($module == '') {
$module = $adb->query_result($adb->pquery("SELECT setype FROM vtiger_crmentity WHERE crmid = ?", array($crmid)), 0, 'setype');
}
if ($crmid != '' && $module != '') {
$fieldvalues = getEntityName($module, array($crmid));
if ($module == 'Contacts') {
$fieldvalue = '<a href="index.php?module=Contacts&action=index&id=' . $crmid . '">' . $fieldvalues[$crmid] . '</a>';
} elseif ($module == 'Accounts') {
$fieldvalue = '<a href="index.php?module=Accounts&action=index&id=' . $crmid . '">' . $fieldvalues[$crmid] . '</a>';
}
} else {
$fieldvalue = '';
}
//.........这里部分代码省略.........
示例3: restart
//сохраняем все в $add
restart();
// вызываем restart(); для очистки формы
} elseif (isset($_POST['clear_form']) || isset($_POST['back'])) {
// кнопка очистить форму вызывает restart();
restart();
} elseif (isset($_POST['clear_base'])) {
// по кнопке очистить базу очищаем массив $_SESSION['ad']
save_for_add('NULL');
restart();
} elseif (isset($_GET['del_ad'])) {
// ловим ключ del_ad в массиве $_GET
del_ad((int) $_GET['del_ad']);
// и удаляем запись по этому ключу в массиве $_SESSION['ad']
$add = array_values($add);
save_for_add($add);
restart();
} elseif (isset($_GET['click_id'])) {
// действие по клику на объявление
$click_id = (int) $_GET['click_id'];
// присваиваем переменной $click_id номер кликнутого объявления
if (isset($add[$click_id])) {
// если объявление такое существует
print_form($add[$click_id]);
// выводим в форму
}
} else {
print_form();
// иначе выводим пустую форму
show_all($add);
}
示例4: Draw_Page
function Draw_Page($Page_Type)
{
// Read only pages - these pages don't strictly require user authentication.
// Therefore, to enable permit-all page viewing, comment out the call
// to rejectIfNotAuthenticated() in the relevant case block. Note, some of
// these pages will replace sensitive info such as telephone/email with
// the string 'PROTECTED'
// ************************************************************************
switch ($Page_Type) {
case "default":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/start_page.php';
startPage();
break;
case "View_Service_Endpoint":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/service/view_service_endpoint.php';
view_endpoint();
break;
case "Service_Groups":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/service_group/view_all.php';
showAllServiceGroups();
break;
case "Service_Group":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/service_group/view_sgroup.php';
showServiceGroup();
break;
case "Site":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/site/view_site.php';
view_site();
break;
case "NGI":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/ngi/view_ngi.php';
view_ngi();
break;
case "Service":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/service/view_service.php';
view_se();
break;
case "Services":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/service/view_all.php';
drawSEs();
break;
case "NGIs":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/ngi/view_ngis.php';
view_ngis();
break;
case "Sites":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/site/view_all.php';
showAllSites();
break;
case "Projects":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/project/view_all.php';
show_all_projects();
break;
case "Project":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/project/view_project.php';
show_project();
break;
case "Scope_Help":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/scope_help.php';
show_help();
break;
case "Site_Geo_xml":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/sitesForGoogleMapXML.php';
show_xml();
break;
case "Error_Redirect":
//rejectIfNotAuthenticated();
show_view('error.php', $_REQUEST['error']);
break;
case "Static_HTML":
//rejectIfNotAuthenticated();
Draw_Static_HTML();
break;
case "Search":
//rejectIfNotAuthenticated();
require_once __DIR__ . '/controllers/search.php';
search();
break;
// CrUD Pages - These pages MUST have authentication enabled so
// the calls to rejectIfNotAuthenticated() must be used.
// *********************************************************************
// CrUD Pages - These pages MUST have authentication enabled so
// the calls to rejectIfNotAuthenticated() must be used.
// *********************************************************************
case "Revoke_Role":
rejectIfNotAuthenticated();
//.........这里部分代码省略.........
示例5: Header
}
$user->bolt->update("flags={$flags}");
$user->bolt->flags = $flags;
Header('Location: bolt_admin.php');
break;
case 'hide':
if (!$course) {
error_page("no such course");
}
$course->update("hidden=1");
Header('Location: bolt_admin.php');
break;
case 'unhide':
if (!$course) {
error_page("no such course");
}
$course->update("hidden=0");
Header('Location: bolt_admin.php');
break;
case 'clear_confirm':
clear_confirm();
break;
case 'clear':
clear();
break;
case '':
show_all();
break;
default:
error_page("unknown action {$action}");
}
示例6: get_pricebooks_list
/**
* Get PriceBook list
*
* @param array $input_array input data
* @return array resulted data
*/
function get_pricebooks_list($input_array)
{
require_once 'modules/PriceBooks/PriceBooks.php';
require_once 'include/utils/UserInfoUtil.php';
global $adb, $log;
global $current_user;
require_once 'modules/Users/Users.php';
$log->debug("Entering customer portal function get_pricebooks_list");
$user = new Users();
$userid = getPortalUserid();
$show_all = show_all('PriceBooks');
$current_user = $user->retrieveCurrentUserInfoFromFile($userid);
$id = $input_array['id'];
$only_mine = $input_array['onlymine'];
$only_base = $input_array['onlybase'];
$sessionid = $input_array['sessionid'];
if (!validateSession($id, $sessionid)) {
return null;
}
$entity_ids_list = array();
if ($only_mine == 'true') {
array_push($entity_ids_list, $id);
} else {
// TODO
}
$focus = new PriceBooks();
$focus->filterInactiveFields('PriceBooks');
foreach ($focus->list_fields as $fieldlabel => $values) {
foreach ($values as $table => $fieldname) {
$fields_list[$fieldlabel] = $fieldname;
}
}
$FieldVisibilityByColumn = array();
foreach ($fields_list as $fieldlabel => $fieldname) {
$FieldVisibilityByColumn[$fieldname] = getColumnVisibilityPermission($current_user->id, $fieldname, 'PriceBooks');
}
// PriceBooks items selection
$query = "SELECT * FROM vtiger_pricebook " . "INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_pricebook.pricebookid AND vtiger_crmentity.deleted = 0 " . "WHERE active = 1 ";
if (count($entity_ids_list) > 0) {
$query .= "AND owner_id IN (" . generateQuestionMarks($entity_ids_list) . ")";
}
$params = array($entity_ids_list);
$res = $adb->pquery($query, $params);
$noofdata = $adb->num_rows($res);
for ($j = 0; $j < $noofdata; $j++) {
$i = 0;
foreach ($fields_list as $fieldlabel => $fieldname) {
if (strcmp($fieldname, 'active') == 0) {
continue;
}
$fieldper = $FieldVisibilityByColumn[$fieldname];
if ($fieldper == '1') {
continue;
}
$output[0]['head'][0][$i]['fielddata'] = $fieldlabel;
$fieldvalue = $adb->query_result($res, $j, $fieldname);
$pricebookid = $adb->query_result($res, $j, 'pricebookid');
if ($fieldname == 'bookname') {
$fieldvalue = '<a href="index.php?module=PriceBooks&action=index&fun=detail&pricebookid=' . $pricebookid . '">' . $fieldvalue . '</a>';
}
if ($fieldname == 'owner_id') {
// TODO
}
$output[1]['data'][$j][$i]['fielddata'] = $fieldvalue;
$i++;
}
}
$log->debug("Exiting customer portal function get_pricebooks_list");
return $output;
}
示例7: elseif
@fclose($fp);
} elseif ($where_ == 'aps') {
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=slaveserver_' . $server_ . '.log');
$server = Abstract_Server::load($server_);
if (!$server) {
Logger::error('main', '(admin/logs) download_log() - cannot load Server \'' . $server_ . '\'');
redirect();
}
$buf = new Server_Logs($server);
$buf->process();
while ($str = $buf->getContent()) {
echo $str;
}
}
die;
}
$prefs = Preferences::getInstance();
if (is_object($prefs)) {
$log_flags = $prefs->get('general', 'log_flags');
} else {
$log_flags = array();
}
if (isset($_GET['show'])) {
show_specific($_GET['where'], isset($_GET['name']) ? $_GET['name'] : NULL, isset($_GET['server']) ? $_GET['server'] : NULL, $log_flags);
}
if (isset($_GET['download'])) {
download_log($_GET['where'], isset($_GET['name']) ? $_GET['name'] : NULL, isset($_GET['server']) ? $_GET['server'] : NULL);
}
show_all($log_flags);
示例8: get_page_id
}
break;
case 'tags':
if (isset($s)) {
$id = get_page_id($s);
echo "<h3>{$page_display_name} (" . $lang['tags'] . ")</h3>\n\t\t\t\t\t<div class=\"tag_section\">\n";
public_tag_cloud('pixie_dynamic_posts', "page_id = {$id} and public = 'yes'");
echo "\t\t\t\t\t</div>\n";
}
break;
default:
$mtitle = "{$page_display_name}";
if (isset($s)) {
$id = get_page_id($s);
$rs = safe_rows_start('*', 'pixie_dynamic_posts', "page_id = '{$id}' and public = 'yes' order by posted desc limit {$posts_per_page}");
show_all($rs);
}
break;
}
break;
}
// ------------------------------------------------------------------
// function show all
function show_all($rs)
{
global $s, $m, $x, $p, $mtitle, $site_url, $comments, $lang, $date_format, $posts_per_page, $timezone;
echo "<h3>{$mtitle}</h3>\n";
if (!$m) {
if (isset($s)) {
$page_description = safe_field('page_description', 'pixie_core', "page_name='{$s}'");
//echo "\t\t\t\t\t<div id=\"page_description\">$page_description</div>";
示例9: pages
function pages($k, $t, $c, $d = null, $m = null, $b = null, $ks = null, $nk = null)
{
$r = "<div class='row no-margin-bottom x-center m-left' style='border-bottom:solid 1px #ddd;'>\n\t<div class='x-100 m-50' style='height:80px;'>\n\t\t<div class='middle'>\n\t\t\t<div class='middle-wrapper'>\n\t\t\t\t<h3>{$t}</h3>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class='x-100 s-50 m-25 center' style='height:80px;'>\n\t\t<div class='middle'><div class='middle-wrapper'><div class='group-button full'>\n\t\t" . link_to_all('TODOS', 'button center', $m) . link_to_create('NOVO', 'button center', $m) . "</div></div></div></div>\n\t<div class='x-100 s-50 m-25' style='height:80px;'>\n\t\t<div class='middle'><div class='middle-wrapper'>" . search_form($c, $m) . "</div></div></div>\n</div>\n<div class='row'>\n\t<div class='x-100'>";
if ($k == "index") {
$r .= show_all($d, $ks, $nk);
} elseif ($k == "read") {
$r .= show_one($d, $ks, $nk, $b);
} else {
$r .= $d;
}
$r .= "</div></div>";
return $r;
}
示例10: restart
restart();
// вызываем restart(); для очистки формы
} elseif (isset($_POST['clear_form']) || isset($_POST['back'])) {
// кнопка очистить форму вызывает restart();
save_for_ad_cookie('NULL');
restart();
} elseif (isset($_POST['clear_base'])) {
// по кнопке очистить базу очищаем массив $_SESSION['ad']
unset($_SESSION['ad']);
restart();
} elseif (isset($_GET['del_ad'])) {
// ловим ключ del_ad в массиве $_GET
del_ad((int) $_GET['del_ad']);
// и удаляем запись по этому ключу в массиве $_SESSION['ad']
$ad_cookie = array_values($ad_cookie);
// переназначаем ключи массива с объявлениями после удаления по порядку
save_for_ad_cookie($ad_cookie);
restart();
} elseif (isset($_GET['click_id'])) {
// действие по клику на объявление
$click_id = (int) $_GET['click_id'];
// присваиваем переменной $click_id номер кликнутого объявления
$ad_cookie[$click_id]['id'] = $click_id;
// присваиваем элементу массива с текущимобъявлением его номер в ключ id для возможности его сохранения
print_form($ad_cookie[$click_id]);
// выводим объявление в форму
} else {
print_form();
// иначе выводим пустую форму
show_all($ad_cookie);
}