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; }
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')); } }
$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');
* @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');
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'; $accounts->form->newForm('post', makelink('util-accounts-mail-write'), $form, 'formClass', 2); $accounts->form->addColumn('sender', 1, $roster->locale->act['acc_int']['messaging']['sender'] . ' :', 'membersRow1', $form); $accounts->form->addColumn('sender_val', 1, $accounts->user->getUser($message['sender']), 'membersRow1', $form); $accounts->form->addColumn('title', 1, $roster->locale->act['acc_int']['messaging']['title'] . ' :', 'membersRow2', $form); $accounts->form->addColumn('title_val', 1, $message['title'], 'membersRow2', $form); $accounts->form->addColumn('body', 1, $roster->locale->act['acc_int']['messaging']['body'] . ' :', 'membersRow1', $form); $accounts->form->addColumn('body_val', 1, $message['body'], 'membersRow1', $form); $trayID = $accounts->form->addTray('buttonTray', $form); $accounts->form->addHiddenField($trayID, 'title', $message['title'], $form); $accounts->form->addHiddenField($trayID, 'body', $message['body'], $form); $accounts->form->addHiddenField($trayID, 'reciever', $message['sender'], $form); $accounts->form->addSubmitButton($trayID, 'reply', $roster->locale->act['acc_int']['messaging']['reply'], $form); if ($message['read'] == 0 && $message['sender'] != $accounts->session->getVal('uid')) { $accounts->messaging->markAsRead($id); } } elseif (isset($roster->pages[3]) && $roster->pages[3] == 'write') { if (isset($_POST['reply'])) { $title_val = 'RE: ' . $_POST['title']; $body_val = $_POST['body']; $rec_val = $_POST['reciever']; } else { $title_val = ''; $body_val = ''; $rec_val = ''; } if (isset($_POST['submit'])) { $accounts->messaging->sendMessage($_POST['title'], $_POST['body'], $_POST['sender'], $_POST['reciever'], $_POST['senderLevel']); } $form = 'newMessageForm'; $accounts->form->newForm('post', makelink('util-accounts-mail-write'), $form, 'formClass', 2); $accounts->form->addUserSelect('reciever', $roster->locale->act['acc_int']['messaging']['reciever'] . ' :', 1, $form, $rec_val); $accounts->form->addTextBox('text', 'title', $title_val, $roster->locale->act['acc_int']['messaging']['title'] . ' :', 'wowinput128', 1, $form); $accounts->form->addTextArea('body', $body_val, $roster->locale->act['acc_int']['messaging']['body'] . ' :', 1, $form); $trayID = $accounts->form->addTray('buttonTray', $form); $accounts->form->addHiddenField($trayID, 'sender', $accounts->session->getVal('uid'), $form); $accounts->form->addHiddenField($trayID, 'senderLevel', $accounts->session->getVal('groupID'), $form); $accounts->form->addResetButton($trayID, 'clear', $roster->locale->act['config_reset_button'], $form); $accounts->form->addSubmitButton($trayID, 'submit', $roster->locale->act['submit'], $form); } else { $form = 'mainForm'; $accounts->form->newForm('post', makelink('util-accounts-mail'), $form, 'formClass', 1); $accounts->form->addColumn('mail_txt', 1, $roster->locale->act['acc_int']['messaging']['main'], 'membersRow1', $form); } $roster->tpl->assign_block_vars('accounts_messaging', array('BORDER_START' => border('syellow', 'start', $roster->locale->act['acc_page']['messaging'] . $mail_page), 'MENU' => $mail_menu, 'FORM' => $accounts->form->getTableOfElements_1(1, $form), 'BORDER_END' => border('syellow', 'end'), 'MESSAGE' => isset($error) ? $error : " ", 'ACC_MENU' => $menu)); $roster->tpl->set_filenames(array('accounts_messaging' => $addon['basename'] . '/messaging.html')); $roster->tpl->display('accounts_messaging'); } $error = $accounts->messaging->err_msg; // error message $mail_page = ''; if (isset($roster->pages[3])) { $mail_page = ' - ' . ucfirst($roster->pages[3]); } return; }
} $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);
$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');
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')) {
/** * 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 ''; } }
} 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>
$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">
/** * 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; }
} 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 . '" />
$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');
<?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>");
<?php /** * WoWRoster.net WoWRoster * * License Information * * LICENSE: Licensed under the Creative Commons * "Attribution-NonCommercial-ShareAlike 2.5" license * * @copyright 2002-2008 WoWRoster.net * @license http://creativecommons.org/licenses/by-nc-sa/2.5 Creative Commons "Attribution-NonCommercial-ShareAlike 2.5" * @version SVN: $Id: license.php 1791 2008-06-15 16:59:24Z Zanix $ * @link http://www.wowroster.net * @since File available since Release 1.8.0 * @package WoWRoster */ if (!defined('IN_ROSTER')) { exit('Detected invalid access to this file!'); } $roster->output['title'] = 'License'; echo messagebox("<div align=\"left\">\r\n<p align=\"center\"><span class=\"headline_3\">WoWRoster is licensed under a Creative Commons<br />\r\n"Attribution-NonCommercial-ShareAlike 2.5" license</span></p>\r\n\r\n<br />\r\n\r\n<p>Short summary: <a href=\"http://creativecommons.org/licenses/by-nc-sa/2.5\" target=\"_blank\">http://creativecommons.org/licenses/by-nc-sa/2.5</a><br />\r\nFull license: <a href=\"http://creativecommons.org/licenses/by-nc-sa/2.5/legalcode\" target=\"_blank\">http://creativecommons.org/licenses/by-nc-sa/2.5/legalcode</a></p>\r\n\r\n<br />\r\n\r\n<strong>Regarding Attribution:</strong>\r\n<ul>\r\n\t<li>Keep the credits in the footer of the WoWRoster pages</li>\r\n\t<li>Include this license (license.txt) with all modified versions of the WoWRoster</li>\r\n</ul>\r\n<strong>Regarding ShareAlike:</strong>\r\n<ul>\r\n\t<li>Any changes made to the WoWRoster code must be archived and accessible for public download</li>\r\n\t<li>Including, but not limited to:\r\n\t\t<ul>\r\n\t\t<li>HTML, TXT, PHP, CSS, SQL, images, and Javascript</li>\r\n\t\t</ul></li>\r\n\t<li>You may, of course, remove username, password, and database host information from the archive</li>\r\n</ul>\r\n\r\n<p>For any reuse or distribution, you must make clear to others the license terms of this work<br />\r\nAny of these conditions can be waived if you get permission from the dev team at <a href=\"http://www.wowroster.net\" target=\"_blank\">wowroster.net</a></p>\r\n\r\n<hr />\r\n\r\n<p align=\"center\"><span class=\"headline_3\">Serveral external libraries are included with WoWRoster<br />\r\nthat are not included under the main WoWRoster license</span></p>\r\n\r\n<br />\r\n\r\n<p>These are:</p>\r\n\r\n<br />\r\n\r\n<strong>Tab Content Script</strong> - DynamicDrive\r\n<ul>\r\n\t<li><a href=\"http://www.dynamicdrive.com\" target=\"_blank\">http://www.dynamicdrive.com</a></li>\r\n\t<li>DynamicDrive Terms of Use <a href=\"http://www.dynamicdrive.com/notice.htm\" target=\"_blank\">http://www.dynamicdrive.com/notice.htm</a></li>\r\n\t<li>File located at [js/tabcontent.js]</li>\r\n</ul>\r\n\r\n<strong>Color Pallet Script</strong> - DhtmlGoodies\r\n<ul>\r\n\t<li><a href=\"http://www.dynamicdrive.com\" target=\"_blank\">http://www.dynamicdrive.com</a></li>\r\n\t<li>DynamicDrive Terms of Use <a href=\"http://www.dynamicdrive.com/notice.htm\" target=\"_blank\">http://www.dynamicdrive.com/notice.htm</a></li>\r\n\t<li>File located at [js/color_functions.js]</li>\r\n</ul>\r\n\r\n<strong>Overlib tooltip library</strong> - Erik Bosrup\r\n<ul>\r\n\t<li><a href=\"http://www.bosrup.com/web/overlib\" target=\"_blank\">http://www.bosrup.com/web/overlib</a></li>\r\n\t<li>Overlib License: <a href=\"http://www.bosrup.com/web/overlib/?License\" target=\"_blank\">http://www.bosrup.com/web/overlib/?License</a></li>\r\n\t<li>File located at [js/overlib.js]</li>\r\n</ul>\r\n\r\n<strong>DHTML Drag & Drop library</strong> - Walter Zorn\r\n<ul>\r\n\t<li><a href=\"http://www.walterzorn.com/dragdrop/dragdrop_e.htm\" target=\"_blank\">http://www.walterzorn.com/dragdrop/dragdrop_e.htm</a></li>\r\n\t<li>GNU Lesser General Public License: <a href=\"http://gnu.org/copyleft/lesser.html\" target=\"_blank\">http://gnu.org/copyleft/lesser.html</a></li>\r\n\t<li>File located at [js/wz_dragdrop.js]</li>\r\n</ul>\r\n\r\n<strong>Modified EQdkp installer</strong>\r\n<ul>\r\n\t<li><a href=\"http://www.eqdkp.com\" target=\"_blank\">http://www.eqdkp.com</a></li>\r\n\t<li>The installer was based on the EQdkp installer</li>\r\n\t<li>GNU General Public License: <a href=\"http://gnu.org/copyleft/gpl.html\" target=\"_blank\">http://gnu.org/copyleft/gpl.html</a></li>\r\n\t<li>This concerns the files:\r\n\t\t<ul>\r\n\t\t\t<li>install.php</li>\r\n\t\t\t<li>pages/upgrade.php</li>\r\n\t\t</ul>\r\n\t</li>\r\n</ul>\r\n\r\n<strong>DragonFly CMS Template Engine</strong>\r\n<ul>\r\n\t<li><a href=\"http://www.dragonflycms.org\" target=\"_blank\">http://www.dragonflycms.org</a></li>\r\n\t<li>GNU General Public License: <a href=\"http://gnu.org/copyleft/gpl.html\" target=\"_blank\">http://gnu.org/copyleft/gpl.html</a></li>\r\n\t<li>This concerns the files:\r\n\t\t<ul>\r\n\t\t\t<li>lib/template.php</li>\r\n\t\t\t<li>lib/template_enc.php</li>\r\n\t\t</ul>\r\n\t</li>\r\n</ul>\r\n\r\n<strong>MiniXML Library</strong>\r\n<ul>\r\n\t<li><a href=\"http://minixml.psychogenic.com\" target=\"_blank\">http://minixml.psychogenic.com</a></li>\r\n\t<li>GNU General Public License: <a href=\"http://gnu.org/copyleft/gpl.html\" target=\"_blank\">http://gnu.org/copyleft/gpl.html</a></li>\r\n\t<li>This concerns the files:\r\n\t\t<ul>\r\n\t\t\t<li>lib/minixml.lib.php</li>\r\n\t\t\t<li>lib/minixml/doc.inc.php</li>\r\n\t\t\t<li>lib/minixml/element.inc.php</li>\r\n\t\t\t<li>lib/minixml/LICENSE</li>\r\n\t\t\t<li>lib/minixml/node.inc.php</li>\r\n\t\t\t<li>lib/minixml/treecomp.inc.php</li>\r\n\t\t</ul>\r\n\t</li>\r\n</ul>\r\n\r\n<strong>NicEdit</strong>\r\n<ul>\r\n\t<li><a href=\"http://www.nicedit.com\" target=\"_blank\">http://www.nicedit.com</a></li>\r\n\t<li>MIT License: <a href=\"http://www.nicedit.com/license.php\" target=\"_blank\">http://www.nicedit.com/license.php</a></li>\r\n\t<li>This concerns the files:\r\n\t\t<ul>\r\n\t\t\t<li>js/nicEdit.js</li>\r\n\t\t\t<li>img/nicEditorIcons.gif</li>\r\n\t\t</ul>\r\n\t</li>\r\n</ul>\r\n</div>", 'WoWRoster License');
} $arrayHeight = 1; $arrayWidth = count($arrayButtons); // --[ Strip out of scope buttons fromt he palet ]-- foreach ($palet as $id => $button) { if ($button['scope'] != $section) { unset($palet[$id]); continue; } } $paletHeight = 1; $paletWidth = count($palet); // --[ Render configuration screen. ]-- $roster->output['html_head'] .= ' <script type="text/javascript" src="' . ROSTER_PATH . 'js/wz_dragdrop.js"></script>' . "\n"; $roster->output['html_head'] .= ' <script type="text/javascript" src="' . ROSTER_PATH . 'js/menuconf.js"></script>' . "\n"; $roster->tpl->assign_vars(array('L_MENU_SELECT' => $roster->locale->act['menuconf_sectionselect'], 'L_ADD_BUTTON' => $roster->locale->act['menuconf_add_button'], 'L_DRAG_DELETE' => $roster->locale->act['menuconf_drag_delete'], 'UNUSED_PALLET' => messagebox('<div id="palet" style="width:' . (40 * $paletWidth + 5) . 'px;height:' . (40 * $paletHeight + 5) . 'px;"></div>', $roster->locale->act['menuconf_unused_buttons'], 'sblue'), 'U_FORM_ACTION' => makelink('&section=' . $section), 'L_CONFIRM_SUBMIT' => $roster->locale->act['confirm_config_submit'], 'L_SAVE_SETTINGS' => $roster->locale->act['config_submit_button'], 'L_URL' => $roster->locale->act['url'], 'L_TITLE' => $roster->locale->act['title'], 'L_ICON' => $roster->locale->act['installer_icon'], 'DHTML_REG' => $dhtml_reg, 'SAVE_STATUS' => isset($save_status) ? $save_status : '', 'SECTION' => $section, 'ARRAY_WIDTH' => $arrayWidth, 'ARRAY_HEIGHT' => $arrayHeight, 'PALLET_WIDTH' => $paletWidth, 'PALLET_HEIGHT' => $paletHeight, 'BUTTON_GRID_WIDTH' => 40 * $arrayWidth + 5, 'BUTTON_GRID_HEIGHT' => 40 * $arrayHeight + 5)); // --[ Section select. ]-- $query = "SELECT `section` FROM " . $roster->db->table('menu') . ";"; $result = $roster->db->query($query); if (!$result) { die_quietly('Could not fetch section list from database for the selection dialog. MySQL said:<br />' . $roster->db->error(), $roster->locale->act['pagebar_menuconf'], __FILE__, __LINE__, $query); } while ($row = $roster->db->fetch($result)) { $roster->tpl->assign_block_vars('section_select', array('SELECTED' => $row['section'] == $section ? true : false, 'NAME' => $row['section'])); } $roster->db->free_result($result); // --[ Main grid design ]-- foreach ($arrayButtons as $pos => $button) { // Save current locale array // Since we add all locales for button name localization, we save the current locale array // This is in case one addon has the same locale strings as another, and keeps them from overwritting one another
/** * Returns the additional controls * * @param string $dir * direction */ function makeToolBar($dir = 'horizontal') { global $roster; // Pre-store server get params $get = isset($_GET['s']) ? '&s=' . $_GET['s'] : ''; $get = isset($_GET['d']) ? '&d=' . $_GET['d'] : ''; $style = '&style=' . ($this->addon['config']['nojs'] ? 'server' : 'client'); $alts = '&alts=' . ($this->addon['config']['group_alts'] == 1 ? 'show' : 'hide'); if ($this->addon['config']['group_alts'] >= 1) { $button[] = '<th class="membersHeader"><a href="#" onclick="closeAlts(\'' . $this->listname . '\',\'' . $roster->config['img_url'] . 'plus.gif\'); return false;"><img src="' . $roster->config['img_url'] . 'minus.gif" alt="+" />' . $roster->locale->act['closeall'] . '</a></th>'; $button[] = '<th class="membersHeader"><a href="#" onclick="openAlts(\'' . $this->listname . '\',\'' . $roster->config['img_url'] . 'minus.gif\'); return false;"><img src="' . $roster->config['img_url'] . 'plus.gif" alt="-" />' . $roster->locale->act['openall'] . '</a></th>'; $button[] = '<th class="membersHeader"><a href="' . makelink($style . '&alts=ungroup' . $get) . '">' . $roster->locale->act['ungroupalts'] . '</a></th>'; } elseif ($this->addon['config']['group_alts'] == 0) { $button[] = '<th class="membersHeader"><a href="' . makelink($style . '&alts=open' . $get) . '">' . $roster->locale->act['openalts'] . '</a></th>'; $button[] = '<th class="membersHeader"><a href="' . makelink($style . '&alts=close' . $get) . '">' . $roster->locale->act['closealts'] . '</a></th>'; } if ($this->addon['config']['nojs']) { $button[] = '<th class="membersHeader"><a href="' . makelink('&style=client' . $alts) . '">' . $roster->locale->act['clientsort'] . '</a></th>'; } else { $button[] = '<th class="membersHeader"><a href="' . makelink('&style=server' . $alts . $get) . '">' . $roster->locale->act['serversort'] . '</a></th>'; } if ($dir == 'horizontal') { $output = implode("\n", $button); } else { $output = implode("</tr>\n<tr>", $button); } return messagebox('<table><tr>' . $output . '</tr></table>', '', 'sgray'); }
<div class="tier-1-c"> <div class="tier-1-title">SigGen</div> '; $config_sql = $roster->db->query($config_str); if ($config_sql && $roster->db->num_rows($config_sql) > 0) { $member_name = $roster->data['name']; $member_realm = str_replace(' ', '%20', $roster->data['server']); $member_str = $member_name . '@' . $roster->data['region'] . '-' . $member_realm; while ($row = $roster->db->fetch($config_sql, SQL_ASSOC)) { $siggen_saved_find = array('/', '%r', '%s'); $siggen_saved_rep = array(DIR_SEP, ROSTER_URL, $addon['url_full']); $save_loc = str_replace('\\', '/', str_replace($siggen_saved_find, $siggen_saved_rep, $row['save_images_dir'])); $image_link = '<img src="' . makelink('util-' . $addon['basename'] . '-' . $row['config_id'] . '&member=' . $member_str . '&saveonly=0', false, false, $row['image_type']) . '" alt="" width="' . $row['main_image_size_w'] . '" height="' . $row['main_image_size_h'] . '" />'; $curr_seo = $roster->config['seo_url']; $roster->config['seo_url'] = $row['link_type'] == 'forceseo' ? 1 : $curr_seo; if ($row['link_type'] == 'short') { print messagebox($image_link . '<br />' . ROSTER_URL . $row['config_id'] . '/' . $member_str . '.' . $row['image_type']) . '<br />'; } elseif ($row['link_type'] == 'saved') { print messagebox($image_link . '<br />' . $save_loc . $member_str . '.' . $row['image_type'], ucfirst($row['config_id']), '', '100%') . '<br />'; } else { print messagebox($image_link . '<br />' . makelink('util-' . $addon['basename'] . '-' . $row['config_id'] . '&member=' . $member_str, true, false, $row['image_type']), ucfirst($row['config_id']), '', '100%') . '<br />'; } $roster->config['seo_url'] = $curr_seo; } print ' </div> </div> </div> </div> </div>'; }
include $addon['admin_dir'] . 'config.func.php'; if (function_exists('topBox')) { $body .= topBox(); } else { $body .= ''; } } // ----[ Set the tablename and create the config class ]---- include ROSTER_LIB . 'config.lib.php'; $config = new roster_config($roster->db->table('addon_config'), '`addon_id` = "' . $addon['addon_id'] . '"'); // ----[ Get configuration data ]--------------------------- $config->getConfigData(); // ----[ Process data if available ]------------------------ $save_message = $config->processData($addon['config']); // ----[ Build the page items using lib functions ]--------- $menu = $config->buildConfigMenu(); $config->buildConfigPage(); $body .= $config->form_start . $save_message . $config->formpages . $config->submit_button . $config->form_end . $config->nonformpages . $config->jscript; } else { $body .= messagebox(sprintf($roster->locale->act['addon_no_config'], $addon['basename']), $roster->locale->act['addon_error'], 'sred'); } } else { $body .= messagebox(sprintf($roster->locale->act['addon_disabled'], $addon['basename']), $roster->locale->act['addon_error'], 'sred'); } // Pass all the css to $roster->output['html_head'] which is a placeholder in roster_header for more css style defines if ($addon['css_url'] != '') { $roster->output['html_head'] .= '<link rel="stylesheet" type="text/css" href="' . $addon['css_url'] . '" />' . "\n"; } if ($addon['tpl_css_url'] != '') { $roster->output['html_head'] .= '<link rel="stylesheet" type="text/css" href="' . $addon['tpl_css_url'] . '" />' . "\n"; }
/** * Create java reload code * * @param string $link */ function _showStartPage() { global $roster, $addon; $message = '<br />'; if ($roster->scope == 'char') { $message .= sprintf($roster->locale->act['start_message'], $roster->locale->act['start_message_the_char'], $roster->data['name'], $roster->locale->act['start_message_this_char']); } elseif ($roster->scope == 'guild') { $message .= sprintf($roster->locale->act['start_message'], $roster->locale->act['start_message_the_guild'], $roster->data['guild_name'], $roster->locale->act['start_message_this_guild']); } elseif ($roster->scope == 'realm') { $message .= sprintf($roster->locale->act['start_message'], $roster->locale->act['start_message_the_realm'], $roster->data['region'] . '-' . $roster->data['server'], $roster->locale->act['start_message_this_realm']); } $message .= '<img src="' . $roster->config['img_url'] . 'blue-question-mark.gif" alt="?" /> <br /><br /> <form action="' . makelink() . '" method="post" id="allow"> <input type="hidden" id="start" name="action" value="" /> <input type="hidden" name="job_id" value="" /> <button type="submit" class="input" onclick="setvalue(\'job_id\',\'0\');setvalue(\'start\',\'start\');">' . $roster->locale->act['start'] . '</button> </form> <br />'; $out = messagebox($message, $this->title, 'sred', '500px'); $this->_debug(1, $out, 'Printed start page', $out ? 'OK' : 'Failed'); print $out; }
* LUA update interface * * * @copyright 2002-2011 WoWRoster.net * @license http://www.gnu.org/licenses/gpl.html Licensed under the GNU General Public License v3. * @version SVN: $Id$ * @link http://www.wowroster.net * @since File available since Release 1.8.0 * @package WoWRoster * @subpackage LuaUpdate */ if (!defined('IN_ROSTER')) { exit('Detected invalid access to this file!'); } if (!$roster->config['authenticated_user']) { print messagebox($roster->locale->act['update_disabled'], $roster->locale->act['update_errors'], 'sred'); return; } // Include update lib require_once ROSTER_LIB . 'update.lib.php'; $update = new update(); // See if UU is requesting this page if (preg_match('/uniuploader/i', $_SERVER['HTTP_USER_AGENT'])) { $update->textmode = true; } // Set template vars $roster->tpl->assign_vars(array('S_DATA' => false, 'S_RESPONSE' => false, 'S_RESPONSE_ERROR' => false, 'S_PASS' => true, 'U_UPDATE' => makelink('update'), 'S_UPDATE_INS' => (bool) $roster->config['update_inst'], 'PAGE_INFO' => $roster->locale->act['pagebar_update'], 'L_UPLOAD_APP' => $roster->config['uploadapp'], 'L_PROFILER' => $roster->config['profiler'], 'L_PASSWORD_TIP' => makeOverlib($roster->locale->act['roster_upd_pw_help'], $roster->locale->act['password'], '', 2, '', ',WRAP,RIGHT'), 'MESSAGES' => '')); // Fetch addon data $update->fetchAddonData(); // Has data been uploaded? if (isset($_POST['process']) && $_POST['process'] == 'process' || $update->textmode) {
$result = $roster->db->query($query); if (!$result) { die_quietly($roster->db->error(), 'Database Error', __FILE__, __LINE__, $query); } $existing_data = $roster->db->num_rows($result) > 0 ? true : false; $data = array('allow' => array(), 'deny' => array()); while ($row = $roster->db->fetch($result)) { if ($row['type'] & 1 == 1) { $data['deny'][] = $row; } else { $data['allow'][] = $row; } } $default_present = $roster->db->query_first("SELECT `name` FROM `" . $roster->db->table('upload') . "` WHERE `default` = 1;"); if (empty($default_present)) { $rcp_message .= messagebox($roster->locale->act['no_default_guild'], $roster->locale->act['pagebar_uploadrules'], 'sred'); } $l_enforce_rules = explode('|', $roster->locale->act['admin']['enforce_rules']); // OUTPUT $roster->tpl->assign_vars(array('S_ENFORCE_RULES' => $roster->config['enforce_rules'], 'S_EXISTING_DATA' => $existing_data, 'L_DISALLOW' => $roster->locale->act['disallow'], 'L_ALLOW' => $roster->locale->act['allow'], 'L_ENFORCE_RULES' => $l_enforce_rules[0], 'L_ENFORCE_RULES_HELP' => makeOverlib($l_enforce_rules[1], $l_enforce_rules[0], '', 0, '', ',WRAP'), 'L_DEFAULT' => $roster->locale->act['default'], 'L_NAME' => $roster->locale->act['name'], 'L_NAME_TIP' => makeOverlib($mode == 'guild' ? $roster->locale->act['guildname'] : $roster->locale->act['charname']), 'L_SERVER' => $roster->locale->act['server'], 'L_SERVER_TIP' => makeOverlib($roster->locale->act['realmname']), 'L_REGION' => $roster->locale->act['region'], 'L_REGION_TIP' => makeOverlib($roster->locale->act['regionname']), 'L_ADD' => $roster->locale->act['add'], 'L_DELETE' => $roster->locale->act['delete'], 'L_UPLOAD_RULES' => $roster->locale->act['pagebar_uploadrules'], 'L_UPLOAD_RULES_HELP' => $roster->locale->act['upload_rules_help'], 'MODE' => $mode)); $menu_items = array('guild', 'char'); foreach ($menu_items as $item) { $roster->tpl->assign_block_vars('upload_rules_menu', array('SELECTED' => $mode == $item ? true : false, 'LINK' => makelink($roster->pages[0] . '-' . $roster->pages[1] . '-' . $item), 'NAME' => $roster->locale->act[$item])); } // Enforce Upload Rules foreach ($data['deny'] as $row) { $roster->tpl->assign_block_vars('deny_list', array('ID' => $row['rule_id'], 'NAME' => $row['name'], 'SERVER' => $row['server'], 'REGION' => $row['region'])); } foreach ($data['allow'] as $row) { $roster->tpl->assign_block_vars('allow_list', array('DEFAULT' => (bool) $row['default'], 'ID' => $row['rule_id'], 'NAME' => $row['name'], 'SERVER' => $row['server'], 'REGION' => $row['region'])); }
/** * statusbox output * * @param int $jobid */ function _nothingToDo() { global $roster; $html = '<span class="title_text"> ' . $roster->locale->act['nothing_to_do'] . ' </span>'; $out = messagebox($html, $title = $this->title, $style = 'syellow', $width = ''); $this->_debug(3, $out, 'Printed error message', 'OK'); print $out; }
while ($row = $roster->db->fetch($result, SQL_ASSOC)) { $addon['rules'][$row['config_name']] = $row['config_value']; } $mainQuery = 'SELECT ' . '`members`.`member_id`, ' . '`members`.`name`, ' . '`members`.`note`, ' . "IF( `members`.`note` IS NULL OR `members`.`note` = '', 1, 0 ) AS 'nisnull', " . '`members`.`officer_note`, ' . "IF( `members`.`officer_note` IS NULL OR `members`.`officer_note` = '', 1, 0 ) AS 'onisnull', " . '`alts`.`main_id`, ' . '`alts`.`alt_type`, ' . '`mains`.`name` AS main_name ' . 'FROM `' . $roster->db->table('members') . '` AS members ' . 'LEFT JOIN `' . $roster->db->table('alts', $addon['basename']) . '` AS alts ON `members`.`member_id` = `alts`.`member_id` ' . 'LEFT JOIN `' . $roster->db->table('members') . '` AS mains ON `alts`.`main_id` = `mains`.`member_id` '; $where[] = '`members`.`guild_id` = "' . $roster->data['guild_id'] . '"'; $order_first[] = 'IF(`members`.`member_id` = `alts`.`member_id`,1,0)'; $order_last[] = '`members`.`level` DESC'; $order_last[] = '`members`.`name` ASC'; $FIELD['name'] = array('lang_field' => 'name', 'filt_field' => '`members`.`name`', 'order' => array('`members`.`name` ASC'), 'order_d' => array('`members`.`name` DESC'), 'display' => 3); $FIELD['main_name'] = array('lang_field' => 'main_name', 'filt_field' => '`mains`.`name`', 'order' => array('`mains`.`name` ASC'), 'order_d' => array('`mains`.`name` DESC'), 'display' => 3); $FIELD['alt_type'] = array('lang_field' => 'alt_type', 'order' => array('`alts`.`alt_type` ASC'), 'order_d' => array('`alts`.`alt_type` DESC'), 'display' => 3); $FIELD['note'] = array('lang_field' => 'note', 'filt_field' => '`members`.`note`', 'order' => array('nisnull', '`members`.`note` ASC'), 'order_d' => array('nisnull', '`members`.`note` DESC'), 'value' => 'debugNote', 'display' => 3); $FIELD['officer_note'] = array('lang_field' => 'officer_note', 'filt_field' => '`members`.`officer_note`', 'order' => array('onisnull', '`members`.`note` ASC'), 'order_d' => array('onisnull', '`members`.`note` DESC'), 'value' => 'debugNote', 'display' => $addon['config']['member_onote'] ? 3 : 0); include_once $addon['inc_dir'] . 'memberslist.php'; $memberlist = new memberslist(); $memberlist->prepareData($mainQuery, $where, null, $order_first, $order_last, $FIELD, 'memberslist'); echo $memberlist->makeMembersList('syellow'); echo "<br />\n" . messagebox(aprint($addon, '$addon', true), 'Config data', 'sgray'); function debugNote($row, $field, $data) { global $addon; $rules = $addon['rules']['use_global'] ? $addon['config'] : $addon['rules']; if (preg_match($rules['getmain_regex'], $row[$field], $regs)) { $tooltip_h = $regs[$rules['getmain_match']]; $tooltip = aprint($regs, '', true); } else { $tooltip_h = ''; $tooltip = 'No main match'; } return '<div ' . makeOverlib($tooltip, $tooltip_h) . '>' . $row[$field] . '</div>' . "\n"; }
<?php session_start("usuarios"); if (!session_is_registered("usu_login") and !session_is_registered("usu_id")) { echo "sua Sessão é inválida....."; exit; } require_once "libs/classes.class"; require_once "libs/funcoes.php"; $db = new db(); if (isset($btncadastrar)) { if ($txtusu_senha != $txtusu_senha2) { messagebox("A senhas devem ser iguais!\\n por favor Digite Novamente"); } else { $campos = array("usu_nome" => $txtusu_nome, "usu_login" => strtolower($txtusu_login), "usu_senha" => md5($txtusu_senha), "usu_ativo" => '1', "usu_grpid" => $_POST["grp_id"], "usu_inst" => $cboins_id); $db->valida_trans($db->insert($campos, "sis_usuarios"), 0); } } ?> <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> </head> <body bgcolor="#cccccc" oncontextmenu="menu_dir(event.clientY,event.clientX,event);return false"> <?php
$query = "INSERT INTO `" . $roster->db->table('comments', 'news') . "` SET " . "`news_id` = '" . $_GET['id'] . "', " . "`author` = '" . $_POST['author'] . "', " . "`content` = '" . $_POST['comment'] . "', " . "`html` = '" . $html . "', " . "`date` = NOW();"; if ($roster->db->query($query)) { echo messagebox($roster->locale->act['comment_add_success']); } else { echo messagebox("There was a DB error while adding your comment. MySQL said: " . $wowdb->db->error()); } } } else { echo messagebox($roster->locale->act['comment_error_process']); } } // Get the article to display at the head of the page $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`) " . "WHERE `news`.`news_id` = '" . $_GET['id'] . "' " . "GROUP BY `news`.`news_id`"; $result = $roster->db->query($query); if ($roster->db->num_rows($result) == 0) { echo messagebox($roster->locale->act['bad_news_id']); } $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'])); } // Assign template vars $roster->tpl->assign_vars(array('L_POSTEDBY' => $roster->locale->act['posted_by'], 'L_EDIT' => $roster->locale->act['edit'], 'L_NAME' => $roster->locale->act['name'], 'L_COMMENTS' => $roster->locale->act['comments'], 'L_ADD_COMMENT' => $roster->locale->act['add_comment'], 'L_ENABLE_HTML' => $roster->locale->act['enable_html'], 'L_DISABLE_HTML' => $roster->locale->act['disable_html'], 'S_HTML_ENABLE' => false, 'S_COMMENT_HTML' => $addon['config']['comm_html'], 'U_ADD_FORMACTION' => makelink('util-news-comment&id=' . $_GET['id']), 'U_NEWS_ID' => $news['news_id'])); if ($addon['config']['comm_html'] >= 0) { $roster->tpl->assign_var('S_HTML_ENABLE', true); if ($addon['config']['news_nicedit'] > 0) { $roster->output['html_head'] .= '<script type="text/javascript" src="' . ROSTER_PATH . 'js/nicEdit.js"></script> <script type="text/javascript"> bkLib.onDomLoaded(function() { nicEditors.allTextAreas({xhtml : true, fullPanel : true, iconsPath : \'' . $roster->config['img_url'] . 'nicEditorIcons.gif\'}) });
$options .= ' <optgroup label="' . $realm . '">' . "\n"; foreach ($guild as $id => $name) { $options .= ' <option value="' . makelink("&guild={$id}", true) . '"' . ($id == $guildset ? ' selected="selected"' : '') . '>' . $name . '</option>' . "\n"; } $options .= ' </optgroup>'; } } else { } $body = 'Select A Guild <form action="' . makelink() . '" name="realm_select" method="post"> <select name="guild" onchange="window.location.href=this.options[this.selectedIndex].value;"> <option>----------</option> ' . $options . ' </select> </form>'; $body = messagebox($body, '', 'sgreen'); // Build the AutoRecruit controls if ($guildset != '') { $sqlstring = 'SELECT * FROM ' . $roster->db->table('recruitment', $addon['basename']) . ' WHERE `guild_id` = ' . $guildset; $result = $roster->db->query($sqlstring); if ($result) { if ($roster->db->num_rows() == 0) { $guild_setup = 'INSERT INTO `' . $roster->db->table('recruitment', $addon['basename']) . '` (`guild_id`, `app_link`, `min_level`, `max_druid`, `max_hunter`, `max_mage`, `max_paladin`, `max_priest`, `max_rogue`, `max_shaman`, `max_warlock`, `max_warrior`) VALUES (' . $guildset . ', "http://" , 70, 0, 0, 0, 0, 0, 0, 0, 0, 0)'; $new_guild = $roster->db->query($guild_setup); $result = $roster->db->query($sqlstring); } $alldata = $roster->db->fetch_all($result); // Get Class Names foreach ($roster->multilanguages as $locale) { $druids[] = $roster->locale->wordings[$locale]['Druid']; $hunters[] = $roster->locale->wordings[$locale]['Hunter'];
if (isset($files[$directory])) { foreach ($files[$directory] as $file => $filedata) { if ($filedata['update']) { if (isset($file) && $file != 'newer' && $file != 'severity' && $file != 'tooltip' && $file != 'rollup' && $file != 'rev' && $file != 'date' && $file != 'author' && $file != 'md5' && $file != 'update' && $file != 'missing') { if ($zippackage_files != '') { $zippackage_files .= ';'; } $zippackage_files .= $directory . '/' . $file; } } } } } if ($zippackage_files != '') { if (!$roster->auth->getAuthorized(ROSTERLOGIN_ADMIN)) { echo messagebox('Log in as Roster Admin to download update files', 'Updates Available!', 'spurple'); echo '<br />'; } else { echo border('spurple', 'start', '<span class="blue">Download Update Package</span>'); echo '<div align="center" style="background-color:#1F1E1D;"><form method="post" action="' . ROSTER_SVNREMOTE . '">'; echo '<input type="hidden" name="filestoget" value="' . $zippackage_files . '" />'; echo '<input type="hidden" name="guildname" value="' . $roster->config['default_name'] . '" />'; echo '<input type="hidden" name="website" value="' . $roster->config['website_address'] . '" />'; echo '<input type="radio" name="ziptype" id="zip" value="zip" checked="checked" /><label for="zip">.zip Archive</label><br />'; echo '<input type="radio" name="ziptype" id="targz" value="targz" /><label for="targz">.tar.gz Archive</label><br /><br />'; echo '<input style="decoration:bold;" type="submit" value="[GET UPDATE PACKAGE]" /><br />'; echo '</form></div>'; echo border('spurple', 'end') . '<br />'; } } // Open the main FileVersion table in total color
// First option is blank $options .= "\t\t<option>------</option>\n"; foreach ($gatherwords['zones'][$worldnumber] as $zone => $zonename) { // Select the option if we are viewing it if ($continent == $worldnumber && $map == $zone) { $options .= "\t\t<option selected=\"selected\" value=\"{$script_filename}&continent=" . rawurlencode($worldname) . "&map={$zone}\">{$zonename}</option>\n"; } else { $options .= "\t\t<option value=\"{$script_filename}&continent={$worldnumber}&map={$zone}\">{$zonename}</option>\n"; } } $options .= "\t\t</select></td>\n"; } // Build the complete table $options = $options_table . "</tr>\n<tr>\n" . $options . "</tr></table>\n"; // Output table in a pretty border $options = messagebox($options, $gatherwords['gatherer_selectzone']); ?> <div align="center"> <form method="post" action="<?php print $script_filename; ?> "> <?php echo $options; ?> </form> <br /> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1000" height="668" title="Gatherer"> <param name="movie" value="<?php echo ROSTER_URL; ?>