本文整理汇总了PHP中messagebox函数的典型用法代码示例。如果您正苦于以下问题:PHP messagebox函数的具体用法?PHP messagebox怎么用?PHP messagebox使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了messagebox函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: topBox
function topBox()
{
global $roster;
global $addon;
$return = '';
if ($addon['config']['choose_guild'] == 0) {
//UPDATE `roster20_addon_config` SET `config_value` = '1' WHERE `addon_id` =49 AND `id` =1100 LIMIT 1 ;
$query = "UPDATE {$roster->db->prefix}addon_config SET `config_value` = '0' WHERE `addon_id` =\n\t\t\t\t\t'{$addon['addon_id']}' AND `config_name` = 'main_enable' ";
$result = $roster->db->query($query);
//return messagebox("Guild must be selected before enabling.","Warning");
$return .= messagebox("Guild must be selected before enabling.", "Warning");
}
return $return;
}
示例2: guide_step2
function guide_step2()
{
global $roster;
$roster->tpl->assign_var('S_STEP_2', true);
$name = trim(post_or_db('name'));
$server = trim(post_or_db('server'));
$region = strtoupper(substr(trim(post_or_db('region')), 0, 2));
if (!empty($name) || !empty($server) || !empty($region)) {
$query = "UPDATE `" . $roster->db->table('upload') . "` SET `default` = '0';";
if (!$roster->db->query($query)) {
die_quietly($roster->db->error(), 'Database Error', __FILE__, __LINE__, $query);
}
$query = "INSERT INTO `" . $roster->db->table('upload') . "`" . " (`name`,`server`,`region`,`type`,`default`)" . " VALUES ('" . $name . "','" . $server . "','" . $region . "','0','1');";
if (!$roster->db->query($query)) {
die_quietly($roster->db->error(), 'Database Error', __FILE__, __LINE__, $query);
}
$roster->tpl->assign_var('MESSAGE', messagebox(sprintf($roster->locale->act['guide_complete'], makelink('rostercp-install'))));
} else {
$roster->tpl->assign_var('MESSAGE', messagebox($roster->locale->act['upload_rules_error'], '', 'sred'));
}
}
示例3: isset
$realhash = $row['hash'];
}
if ($roster->auth->getAuthorized(ROSTERLOGIN_ADMIN)) {
$oldpass = isset($_POST['oldpass']) ? $_POST['oldpass'] : '';
$newpass = isset($_POST['newpass']) ? $_POST['newpass'] : '';
$confirmpass = isset($_POST['confirmpass']) ? $_POST['confirmpass'] : '';
$success = 0;
if ($mode == 'Admin' && md5($oldpass) != $realhash) {
$rcp_message .= messagebox($roster->locale->act['pass_old_error'], $roster->locale->act['roster_cp'], 'sred');
} elseif (!array_key_exists('newpass', $_POST) || !array_key_exists('confirmpass', $_POST)) {
$rcp_message .= messagebox($roster->locale->act['pass_submit_error'], $roster->locale->act['roster_cp'], 'sred');
} elseif ($newpass != $confirmpass) {
$rcp_message .= messagebox($roster->locale->act['pass_mismatch'], $roster->locale->act['roster_cp'], 'sred');
} elseif ($newpass === '' || $confirmpass === '' || md5($newpass) == md5('')) {
$rcp_message .= messagebox($roster->locale->act['pass_blank'], $roster->locale->act['roster_cp'], 'sred');
} elseif (md5($newpass) == $realhash) {
$rcp_message .= messagebox($roster->locale->act['pass_isold'], $roster->locale->act['roster_cp'], 'sorange');
} else {
$query = 'UPDATE `' . $roster->db->table('account') . '` SET `hash` = "' . md5($newpass) . '" WHERE `name` = "' . $mode . '";';
$result = $roster->db->query($query);
if (!$result) {
die_quietly('There was a database error while trying to change the password. MySQL said: <br />' . $roster->db->error(), $roster->locale->act['roster_cp'], __FILE__, __LINE__, $query);
}
$success = 1;
$rcp_message .= messagebox(sprintf($roster->locale->act['pass_changed'], $mode, '<span style="font-size:11px;color:red;">' . $newpass . '</span>'), $roster->locale->act['roster_cp'], 'sgreen');
}
$rcp_message .= '<br />';
}
}
$roster->tpl->set_filenames(array('body' => 'admin/change_pass.html'));
$body = $roster->tpl->fetch('body');
示例4: exit
* @license http://www.gnu.org/licenses/gpl.html Licensed under the GNU General Public License v3. * @package News
*/
if (!defined('IN_ROSTER')) {
exit('Detected invalid access to this file!');
}
$roster->auth->setAction('&id=' . $_GET['id']);
if (!$roster->auth->getAuthorized($addon['config']['news_edit'])) {
echo $roster->auth->getLoginForm($addon['config']['news_edit']);
return;
//To the addon framework
}
// Display news
$query = "SELECT * " . "FROM `" . $roster->db->table('news', $addon['basename']) . "` news " . "WHERE `news_id` = '" . $_GET['id'] . "';";
$result = $roster->db->query($query);
if ($roster->db->num_rows($result) == 0) {
echo messagebox($roster->locale->act['bad_news_id'], '', 'sred');
return;
}
$news = $roster->db->fetch($result);
// Assign template vars
$roster->tpl->assign_vars(array('S_ADD_NEWS' => false, 'S_HTML_ENABLE' => false, 'S_NEWS_HTML' => (bool) $news['html'], 'U_EDIT_FORMACTION' => makelink('guild-main'), 'U_NEWS_ID' => $news['news_id'], 'CONTENT' => $news['text'], 'AUTHOR' => $news['poster'], 'TITLE' => $news['title']));
if ($addon['config']['news_html'] >= 0) {
$roster->tpl->assign_var('S_HTML_ENABLE', true);
if ($addon['config']['news_nicedit'] > 0) {
roster_add_js('js/ckeditor/ckeditor.js');
}
}
$roster->tpl->set_filenames(array('head' => $addon['basename'] . '/news_head.html', 'body' => $addon['basename'] . '/edit.html', 'foot' => $addon['basename'] . '/news_foot.html'));
$roster->tpl->display('head');
$roster->tpl->display('body');
$roster->tpl->display('foot');
示例5: mailPage
function mailPage()
{
global $roster, $addon, $accounts;
$roster->output['show_menu']['acc_menu'] = 1;
// Display the button listing
$form = '';
$menu = '';
$mail_menu = '';
// Disallow viewing of the page
if (!$roster->auth->getAuthorized($addon['config']['acc_min_access'])) {
print '<span class="title_text">' . $roster->locale->act['acc_page']['messaging'] . '</span><br />' . $roster->auth->getMessage() . $roster->auth->getLoginForm();
} else {
$tab1 = explode('|', $roster->locale->act['acc_main_menu']['my_prof']);
$tab2 = explode('|', $roster->locale->act['acc_main_menu']['chars']);
$tab3 = explode('|', $roster->locale->act['acc_main_menu']['guilds']);
$tab4 = explode('|', $roster->locale->act['acc_main_menu']['realms']);
$tab5 = explode('|', $roster->locale->act['acc_main_menu']['mail']);
$tab6 = explode('|', $roster->locale->act['acc_main_menu']['char']);
$tab7 = explode('|', $roster->locale->act['acc_main_menu']['prof']);
$menu = messagebox('
<ul class="tab_menu">
<li><a href="' . makelink('util-accounts-profile-' . $accounts->user->info['uname']) . '" style="cursor:help;"' . makeOverlib($tab1[1], $tab1[0], '', 1, '', ',WRAP') . '>' . $tab1[0] . '</a></li>
<li><a href="' . makelink('util-accounts-chars') . '" style="cursor:help;"' . makeOverlib($tab2[1], $tab2[0], '', 1, '', ',WRAP') . '>' . $tab2[0] . '</a></li>
<li><a href="' . makelink('util-accounts-guilds') . '" style="cursor:help;"' . makeOverlib($tab3[1], $tab3[0], '', 1, '', ',WRAP') . '>' . $tab3[0] . '</a></li>
<li><a href="' . makelink('util-accounts-realms') . '" style="cursor:help;"' . makeOverlib($tab4[1], $tab4[0], '', 1, '', ',WRAP') . '>' . $tab4[0] . '</a></li>
<li><a href="' . makelink('util-accounts-mail') . '" style="cursor:help;"' . makeOverlib($tab5[1], $tab5[0], '', 1, '', ',WRAP') . '>' . $tab5[0] . '</a></li>
<li><a href="' . makelink('util-accounts-settings') . '" style="cursor:help;"' . makeOverlib($tab6[1], $tab6[0], '', 1, '', ',WRAP') . '>' . $tab6[0] . '</a></li>
<li><a href="' . makelink('util-accounts-settings-profile') . '" style="cursor:help;"' . makeOverlib($tab7[1], $tab7[0], '', 1, '', ',WRAP') . '>' . $tab7[0] . '</a></li>
</ul>
', $roster->locale->act['acc_page']['menu'], 'syellow', '145px');
$mail_tab1 = explode('|', $roster->locale->act['acc_mail_menu']['inbox']);
$mail_tab2 = explode('|', $roster->locale->act['acc_mail_menu']['outbox']);
$mail_tab3 = explode('|', $roster->locale->act['acc_mail_menu']['write']);
$mail_menu = messagebox('
<ul class="tab_menu">
<li><a href="' . makelink('util-accounts-mail-inbox') . '" style="cursor:help;"' . makeOverlib($mail_tab1[1], $mail_tab1[0], '', 1, '', ',WRAP') . '>' . $mail_tab1[0] . '</a></li>
<li><a href="' . makelink('util-accounts-mail-outbox') . '" style="cursor:help;"' . makeOverlib($mail_tab2[1], $mail_tab2[0], '', 1, '', ',WRAP') . '>' . $mail_tab2[0] . '</a></li>
<li><a href="' . makelink('util-accounts-mail-write') . '" style="cursor:help;"' . makeOverlib($mail_tab3[1], $mail_tab3[0], '', 1, '', ',WRAP') . '>' . $mail_tab3[0] . '</a></li>
</ul>
', $roster->locale->act['acc_int']['messaging']['menu'], 'syellow', '145px');
if (isset($roster->pages[3]) && $roster->pages[3] == 'inbox') {
$uid = $accounts->session->getVal('uid');
$messages = $accounts->messaging->getAllMessages('', $uid);
if (is_array($messages)) {
$form = 'messsageForm';
$accounts->form->newForm('post', makelink('util-accounts-mail'), $form, 'formClass', 4);
$accounts->form->addColumn('read', 1, $roster->locale->act['acc_int']['messaging']['read'], 'membersHeader', $form);
$accounts->form->addColumn('title', 1, $roster->locale->act['acc_int']['messaging']['title'], 'membersHeader', $form);
$accounts->form->addColumn('sender', 1, $roster->locale->act['acc_int']['messaging']['sender'], 'membersHeader', $form);
$accounts->form->addColumn('date_rec', 1, $roster->locale->act['acc_int']['messaging']['date_rec'], 'membersHeader', $form);
$num = count($messages);
$message = '';
for ($i = 0; $i < $num; $i++) {
if ($i & 1) {
$rowColor = 'membersRow1';
} else {
$rowColor = 'membersRow2';
}
$read_val = 'checkboxOff';
if ($messages[$i]['read'] == '1') {
$read_val = 'checkboxOn';
}
$accounts->form->addColumn('read_' . $i, 1, "<span class='" . $read_val . "' /> ", $rowColor, $form);
$accounts->form->addColumn('title_' . $i, 1, '<a href="' . makelink('util-accounts-mail-read&msgid=' . $messages[$i]['id']) . '">' . $messages[$i]['title'] . '</a>', $rowColor, $form);
$accounts->form->addColumn('sender_' . $i, 1, $accounts->user->getUser($messages[$i]['sender']), $rowColor, $form);
$accounts->form->addColumn('date_' . $i, 1, $messages[$i]['date'], $rowColor, $form);
}
}
} elseif (isset($roster->pages[3]) && $roster->pages[3] == 'outbox') {
$uid = $accounts->session->getVal('uid');
$messages = $accounts->messaging->getAllMessages('', '', $uid);
if (is_array($messages)) {
$form = 'messageForm';
$accounts->form->newForm('post', makelink('util-accounts-mail'), $form, 'formClass', 4);
$accounts->form->addColumn('read', 1, $roster->locale->act['acc_int']['messaging']['read'], 'membersHeader', $form);
$accounts->form->addColumn('title', 1, $roster->locale->act['acc_int']['messaging']['title'], 'membersHeader', $form);
$accounts->form->addColumn('reciever', 1, $roster->locale->act['acc_int']['messaging']['reciever'], 'membersHeader', $form);
$accounts->form->addColumn('date_sent', 1, $roster->locale->act['acc_int']['messaging']['date_sent'], 'membersHeader', $form);
$num = count($messages);
$message = '';
for ($i = 0; $i < $num; $i++) {
if ($i & 1) {
$rowColor = 'membersRow1';
} else {
$rowColor = 'membersRow2';
}
$read_val = 'checkboxOff';
if ($messages[$i]['read'] == '1') {
$read_val = 'checkboxOn';
}
$accounts->form->addColumn('read_' . $i, 1, '<span class="' . $read_val . '" /> ', $rowColor, $form);
$accounts->form->addColumn('title_' . $i, 1, '<a href="' . makelink('util-accounts-mail-read&msgid=' . $messages[$i]['id']) . '">' . $messages[$i]['title'] . '</a>', $rowColor, $form);
$accounts->form->addColumn('reciever_' . $i, 1, $accounts->user->getUser($messages[$i]['reciever']), $rowColor, $form);
$accounts->form->addColumn('date_sent_' . $i, 1, $messages[$i]['date'], $rowColor, $form);
}
}
} elseif (isset($roster->pages[3]) && $roster->pages[3] == 'read') {
$id = $_GET['msgid'];
$message = $accounts->messaging->getMessage($id);
$form = 'readMessageForm';
//.........这里部分代码省略.........
示例6: border
}
$formbody .= "\t</tr>\n";
$i++;
}
$formbody .= "</table>\n" . border('syellow', 'end') . "\n</div>\n";
$formbody .= $prev . $listing . $next;
} else {
$formbody = 'No Data';
}
$roster->output['body_onload'] .= 'initARC(\'config\',\'radioOn\',\'radioOff\',\'checkboxOn\',\'checkboxOff\');';
$body = "\n<form action=\"\" method=\"post\" enctype=\"multipart/form-data\" id=\"config\" onsubmit=\"return confirm('" . $roster->locale->act['confirm_config_submit'] . "');submitonce(this);\">\n\t{$formbody}\n<br /><br />\n<input type=\"submit\" value=\"" . $roster->locale->act['config_submit_button'] . "\" />\n<input type=\"reset\" name=\"Reset\" value=\"" . $roster->locale->act['config_reset_button'] . "\" onclick=\"return confirm('" . $roster->locale->act['confirm_config_reset'] . "')\"/>\n<input type=\"hidden\" name=\"process\" value=\"process\" />\n\n</form>";
$tab1 = explode('|', $roster->locale->act['acc_settings']['set']);
$tab2 = explode('|', $roster->locale->act['acc_settings']['prof']);
$menu = messagebox('
<ul class="tab_menu">
<li class="selected"><a href="' . makelink('util-accounts-settings') . '" style="cursor:help;"' . makeOverlib($tab1[1], $tab1[0], '', 1, '', ',WRAP') . '>' . $tab1[0] . '</a></li>
<li><a href="' . makelink('util-accounts-settings-profile') . '" style="cursor:help;"' . makeOverlib($tab2[1], $tab2[0], '', 1, '', ',WRAP') . '>' . $tab2[0] . '</a></li>
</ul>
', $roster->locale->act['acc_page']['settings'], 'sgray', '145px');
/**
* Process Data for entry to the database
*
* @return string Settings changed or not changed
*/
function processData()
{
global $roster;
$update_sql = array();
// Update only the changed fields
foreach ($_POST as $settingName => $settingValue) {
if (substr($settingName, 0, 5) == 'disp_') {
$settingName = str_replace('disp_', '', $settingName);
示例7: NOW
$query = "INSERT INTO `" . $roster->db->table('news', 'news') . "` SET " . "`author` = '" . $_POST['author'] . "', " . "`title` = '" . $_POST['title'] . "', " . "`content` = '" . $_POST['news'] . "', " . "`html` = '" . $html . "', " . "`date` = NOW();";
if ($roster->db->query($query)) {
echo messagebox($roster->locale->act['news_add_success']);
} else {
echo messagebox("There was a DB error while adding the article. MySQL said: " . $wowdb->db->error());
}
}
} else {
echo messagebox($roster->locale->act['news_error_process']);
}
}
// Display news
$query = "SELECT `news`.*, " . "DATE_FORMAT( DATE_ADD(`news`.`date`, INTERVAL " . $roster->config['localtimeoffset'] . " HOUR ), '" . $roster->locale->act['timeformat'] . "' ) AS 'date_format', " . "COUNT(`comments`.`comment_id`) comm_count " . "FROM `" . $roster->db->table('news', 'news') . "` news " . "LEFT JOIN `" . $roster->db->table('comments', 'news') . "` comments USING (`news_id`) " . "GROUP BY `news`.`news_id`" . "ORDER BY `news`.`date` DESC;";
$result = $roster->db->query($query);
if ($roster->db->num_rows($result) == 0) {
echo messagebox($roster->locale->act['no_news']);
}
// Assign template vars
$roster->tpl->assign_vars(array('L_POSTEDBY' => $roster->locale->act['posted_by'], 'L_EDIT' => $roster->locale->act['edit'], 'L_ADD_NEWS' => $roster->locale->act['add_news'], 'U_ADD_NEWS' => makelink('util-news-add'), 'S_ADD_NEWS' => $roster->auth->getAuthorized($addon['config']['news_add'])));
while ($news = $roster->db->fetch($result)) {
if (isset($news['html']) && $news['html'] == 1 && $addon['config']['news_html'] >= 0) {
$news['content'] = nl2br($news['content']);
} else {
$news['content'] = nl2br(htmlentities($news['content']));
}
$roster->tpl->assign_block_vars('news_row', array('TITLE' => $news['title'], 'ID' => $news['news_id'], 'CONTENT' => $news['content'], 'COMMENT_COUNT' => $news['comm_count'], 'AUTHOR' => $news['author'], 'DATE' => $news['date_format'], 'U_COMMENT' => makelink('util-news-comment&id=' . $news['news_id']), 'U_EDIT' => makelink('util-news-edit&id=' . $news['news_id']), 'L_COMMENT' => $news['comm_count'] != 1 ? sprintf($roster->locale->act['n_comments'], $news['comm_count']) : sprintf($roster->locale->act['n_comment'], $news['comm_count'])));
}
$roster->tpl->set_filenames(array('head' => $addon['basename'] . '/news_head.html'));
$roster->tpl->display('head');
$roster->tpl->set_filenames(array('body' => $addon['basename'] . '/news.html'));
$roster->tpl->display('body');
示例8: define
return;
}
// ----[ End Check log-in ]---------------------------------
define('IN_ROSTER_ADMIN', true);
include_once ROSTER_UCP . 'pages.php';
$header = $menu = $footer = $body = '';
// Find out what subpage to include, and do so
$page = isset($roster->pages[1]) && $roster->pages[1] != '' ? $roster->pages[1] : 'user';
if (isset($config_pages[$page]['file'])) {
if (file_exists(ROSTER_UCP . $config_pages[$page]['file'])) {
require_once ROSTER_UCP . $config_pages[$page]['file'];
} else {
$body = messagebox(sprintf($roster->locale->act['roster_cp_not_exist'], $page), $roster->locale->act['roster_cp'], 'sred');
}
} else {
$body = messagebox($roster->locale->act['roster_cp_invalid'], $roster->locale->act['roster_cp'], 'sred');
}
// Build the pagebar from admin/pages.php
foreach ($config_pages as $pindex => $data) {
$pagename = $roster->pages[0] . ($page != 'roster' ? '-' . $page : '');
if (!isset($data['special']) || $data['special'] != 'hidden') {
$roster->tpl->assign_block_vars('pagebar', array('SPECIAL' => isset($data['special']) ? $data['special'] : '', 'SELECTED' => isset($data['href']) ? $pagename == $data['href'] ? true : false : '', 'LINK' => isset($data['href']) ? makelink($data['href']) : '', 'NAME' => isset($data['title']) ? isset($roster->locale->act[$data['title']]) ? $roster->locale->act[$data['title']] : $data['title'] : ''));
}
}
// Refresh the addon list because we may have installed/uninstalled something
$roster->get_addon_data();
$roster->tpl->assign_var('ADDON_PAGEBAR', (bool) count($roster->addon_data));
foreach ($roster->addon_data as $row) {
$addon = getaddon($row['basename']);
updateCheck($addon);
if (file_exists($addon['ucp_dir'] . 'index.php')) {
示例9: errorMode
/**
* Enter description here...
*
* @param string $message
* @return string
*/
function errorMode($message, $text = null)
{
global $functions;
if (!empty($message)) {
// Replace newline feeds with <br />, then newline
$message = nl2br($message);
$message = messagebox($message, $text, 'sred');
return $message;
} else {
return '';
}
}
示例10: db
}
require_once "libs/classes.class";
require_once "libs/funcoes.php";
$db = new db();
if (isset($btncadastrar)) {
$campos = array("mod_nome" => $txtmod_nome, "mod_descricao" => $txtmod_descr, "mod_arquivo" => $txtmod_arquivo);
$db->begin();
$rs = $db->executa($db->insert($campos, "sis_modulos"));
$mod_id = $db->last_id("sis_modulos", "mod_id");
$db->executa("insert into mnu_pai (mnu_nome,mnu_modid,mnu_akey) values('Cadastros',{$mod_id},'C')");
$db->executa("insert into mnu_pai (mnu_nome,mnu_modid,mnu_akey) values('Consultas',{$mod_id},'o')");
$db->executa("insert into mnu_pai (mnu_nome,mnu_modid,mnu_akey) values('Procedimentos',{$mod_id},'P')");
$db->executa("insert into mnu_pai (mnu_nome,mnu_modid,mnu_akey) values('Relatórios',{$mod_id},'R')");
$db->commit();
if ($rs) {
messagebox("Modulo Cadastrado com Sucesso");
}
}
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Quanta Plus">
<link rel="stylesheet" href="libs/estilos.css" type="text/css" media="all">
<link rel="stylesheet" href="libs/menuw.css" type="text/css" media="all">
<SCRIPT LANGUAGE="JavaScript" SRC="libs/menuw.js"></SCRIPT>
<script language="JavaScript" src="libs/funcoes.js"></script>
<link rel="stylesheet" href="libs/mnucemes.css" title="XP Extended" />
<script type="text/javascript" src="libs/hmenu.js"></script>
示例11: while
$db->begin();
$erro = 0;
$db->executa("delete from per_menus where per_usuid = {$cbousu_id} and mnu_mod = {$cbomod_id}");
while (list($k, $v) = each($per_menu)) {
$sql = "insert into per_menus (mnu_id,per_usuid,mnu_mod) values ({$v},{$cbousu_id},{$cbomod_id})";
$rs = $db->executa($sql);
if (!$rs) {
$erro++;
}
}
if ($erro == 0) {
$db->commit();
messagebox("Permissões liberadas com Sucesso!");
} else {
$db->rollback();
messagebox("Erro ao liberar permissões!\\n Erro: " . $db->erro());
}
}
if (isset($cbousu_id)) {
$sqlmod = "SELECT p.mnu_nome as pai, f.mnu_nome,mnu_arq, mnu_filid,mnu_id,mnu_sub,mnu_paisub\n\t from mnu_filho f inner join mnu_pai p on mnu_pai = mnu_paiid\n\t\t left outer join per_menus on mnu_id = mnu_filid and per_usuid = {$cbousu_id}\n\t\twhere mnu_modid={$cbomod_id} and mnu_sub = 0 order by p.mnu_nome,mnu_filid,mnu_paisub";
} else {
$sqlmod = "select p.mnu_nome as pai,\n mnu_filid,\n f.mnu_nome,\n mnu_sub,mnu_paisub\n from mnu_filho f inner join mnu_pai p on\n\t mnu_pai = mnu_paiid\n\t where mnu_modid={$cbomod_id} mnu_sub = 0 order by p.mnu_nome,mnu_filid,mnu_paisub";
}
$rsmod = $db->executa($sqlmod);
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Quanta Plus">
<link rel="stylesheet" href="libs/estilos.css" type="text/css" media="all">
示例12: roster_die
/**
* Draw a message box with the specified border color, then die cleanly
*
* @param string $text | The message to display inside the box
* @param string $title | The box title (default = 'Message')
* @param string $style | The border style (default = sred)
*/
function roster_die($text, $title = 'Message', $style = 'sred')
{
global $roster;
if ($roster->pages[0] == 'ajax') {
ajax_die($text, $title, null, null, null);
}
// Set scope to util
$roster->scope = 'util';
if (!defined('ROSTER_MENU_INC') && is_array($roster->config)) {
$roster_menu = new RosterMenu();
$roster_menu->makeMenu($roster->output['show_menu']);
}
if (!defined('ROSTER_HEADER_INC') && is_array($roster->config)) {
include_once ROSTER_BASE . 'header.php';
}
$roster_menu->displayMenu();
echo messagebox($text, $title, $style);
if (!defined('ROSTER_FOOTER_INC') && is_array($roster->config)) {
include_once ROSTER_BASE . 'footer.php';
}
if (is_object($roster->db)) {
$roster->db->close_db();
}
exit;
}
示例13: messagebox
} else {
$installer->setmessages('No plugins available!');
}
$errorstringout = $installer->geterrors();
$messagestringout = $installer->getmessages();
$sqlstringout = $installer->getsql();
$message = '';
// print the error messages
if (!empty($errorstringout)) {
$message .= messagebox($errorstringout, $roster->locale->act['installer_error'], 'sred') . '<br />';
}
// Print the update messages
if (!empty($messagestringout)) {
$message .= messagebox($messagestringout, $roster->locale->act['installer_log'], 'syellow');
}
$body .= ($message != '' ? $message . '<br />' : '') . (isset($output) && !empty($output) ? messagebox($output, $roster->locale->act['pagebar_plugininst'], 'sblue') : '');
return;
/**
* Gets the current action for active/inactive
*
* @param string $mode
* @param int $id
* @return string
*/
function activeInactive($mode, $id)
{
global $roster;
if ($mode) {
$type = '<form name="deactivate_' . $id . '" style="display:inline;" method="post" enctype="multipart/form-data" action="' . makelink() . '">
<input type="hidden" name="op" value="deactivate" />
<input type="hidden" name="id" value="' . $id . '" />
示例14: preg_replace
$roster->output['body_onload'] .= "initARC('conf_change_pass','radioOn','radioOff','checkboxOn','checkboxOff');";
$roster->tpl->assign_vars(array('L_CONFIG_RESET' => $roster->locale->act['pagebar_configreset'], 'L_RESET_CONFIRM' => $roster->locale->act['config_reset_confirm'], 'L_RESET_HELP' => $roster->locale->act['config_reset_help'], 'L_PROCEED' => $roster->locale->act['proceed'], 'MESSAGE' => ''));
if (isset($_POST['doit']) && $_POST['doit'] == 'doit') {
$query = 'TRUNCATE `' . $roster->db->table('config') . '`;';
$roster->db->query($query);
$db_data_file = ROSTER_LIB . 'dbal' . DIR_SEP . 'structure' . DIR_SEP . 'mysql_data.sql';
// Parse the data file and populate the database tables
$sql = @fread(@fopen($db_data_file, 'r'), @filesize($db_data_file));
$sql = preg_replace('#renprefix\\_(\\S+?)([\\s\\.,]|$)#', $roster->db->prefix . '\\1\\2', $sql);
$sql = parse_sql($sql, ';');
$sql_count = count($sql);
for ($i = 0; $i < $sql_count; $i++) {
$roster->db->query($sql[$i]);
}
unset($sql);
$roster->tpl->assign_var('MESSAGE', messagebox($roster->locale->act['config_is_reset'], $roster->locale->act['roster_cp']));
}
$roster->tpl->set_filenames(array('body' => 'admin/config_reset.html'));
$body = $roster->tpl->fetch('body');
/**
* Parse multi-line SQL statements into a single line
*
* @param string $sql SQL file contents
* @param char $delim End-of-statement SQL delimiter
* @return array
*/
function parse_sql($sql, $delim)
{
global $roster;
if ($sql == '') {
die_quietly('Could not obtain SQL structure/data');
示例15: db
<?php
require_once "libs/fc_sessoes.php";
require_once "libs/form2.class";
require_once "libs/funcoes.php";
require_once "libs/class_dbgrid.php";
require_once "libs/classes.class";
require_once "libs/class_interface.php";
$db = new db();
$db->_DEBUG = 1;
if (isset($_POST["btncadastrar"])) {
$sql = "select 1 from comandaentrega where cet_comid = " . $_POST["com_id"];
$db->executa($sql);
if ($db->num_rows > 0) {
messagebox("Comanda já lançada!");
} else {
$campos = array("cet_comid" => $_POST["com_id"], "cet_funid" => $_POST["cet_funid"]);
$db->executa($db->insert($campos, "comandaentrega"));
}
}
$form = new form();
$form->Makeform("form1", "post", "", "", "", true, "Controle da Entrega");
$form->linha(false, true);
$form->FrmInput("Comanda:", "com_id", 0, 10, "Número da comanda", "E");
$form->linha(false, true);
$form->FrmSelect("Funcionário:", "cet_funid", true, "funcionarios", "fun_id", "fun_nome", '', -1, "E", $_POST["cet_funid"]);
$form->linha(false, true);
$form->AbreCelula("");
$form->frmbutton("Cadastrar", "btncadastrar", "onclick='return chknulo(document.form1)'", "submit", 't');
$form->fecha();
$form->Append("<hr>");