} } $menu .= ' </ul>' . PHP_EOL; print $menu; $child_items->free_result(); } } } print ' <ul class="nav nav-sidebar">' . PHP_EOL; print ' <li><a class="text-muted" href="#" onclick="$(\'#logout_users\').modal(\'show\')">Log Out <span class="' . B_ICON . ' ' . B_ICON . '-log-out"></span></a></li>' . PHP_EOL; print ' </ul>' . PHP_EOL; ?> </div> <?php $logout_conf = $page->getPlugin('modalconf', array('logout', 'user', WebApp::action('user', 'logout', false), 'post')); $logout_conf->addDefaultConfig(); $logout_conf->setDefaultModal()->setContent('<p>Are you sure you want to logout?</p>')->setDefaultModal()->setTitle('Logout?')->setRightBtn('primary', 'Logout', 'log-out', 'button', 'document.location=\'/action/user/logout\'')->build(); print $logout_conf->getModal(); ?> <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> <div class="row"> <div class="col-xs-12"> <div id="alert_working" class="hidden"> <?php $working = $page->getPlugin('alert'); $working->setAlert('Processing...', B_T_INFO, 'working', false); print $working->getAlert(); ?> </div> <div id="status_bar"></div>
<div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">Email</h1> <?php $checkBtn = array('s' => B_T_INFO, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'checkNames(this)'), 'ic' => 'user'); $sendBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'email\', this, \'send\', \'updateEditor\')'), 'ic' => 'send'); $form = $page->getPlugin('form', array('email', WebApp::action('email', 'send', true), 'post')); $form->setIndent(' ')->setColumns(2, 8, 2)->addSelect2('To', 'to', '', array('t' => 'Contacts to send email to. * denotes group'), array('r' => true))->addTextField('Subject', 'subject', '', array('t' => 'The subject of the email', 'p' => 'Subject'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A subject is required.', 's' => B_T_FAIL)), 'vo' => 'validateOn:["blur"]', 'r' => true))->addTextArea('Message', 'message', '<p>' . $page->parent->user->getFullName() . '</p>', 10, array('t' => 'The email message'), array('ck' => true, 'ckt' => 'Basic'))->addBtnLine(array('Check Addresses' => $checkBtn, 'Send Email' => $sendBtn)); $form->build(); print $form->getForm(); ?> </div> </div> <script type="text/javascript"> $('[name="to"]').select2({ multiple: true, placeholder: "Search for contacts", minimumInputLength: 1, ajax: { url: "/ajax/email/contacts", dataType: 'json', data: function(term, page){ return { q: term } }, results: function (data, page){ return {results: data.data.contacts} } } });
$option_query->store_result(); if ($option_query->num_rows == 1) { $option_query->fetch(); } else { $page->setStatus(404); return; } } else { $page->setStatus(404); return; } } else { $page->setStatus(404); return; } $closeBtn = array('a' => array('t' => 'url', 'a' => '../ipblock_view'), 'ic' => 'remove-sign'); $saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'ipblock_edit\', this, \'save\')'), 'ic' => 'floppy-disk'); $applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'ipblock_edit\', this, \'apply\')'), 'ic' => 'ok-sign'); $form = $page->getPlugin('form', array('ipblock_edit', WebApp::action('core', 'ipblock_edit', true), 'post')); $form->setColumns(2, 6)->setIndent(' ')->addTextField('Block ID', 'id', $block_id, array(), array('ro' => true))->addTextField('Block Created', 'time', date(DATET_LONG, strtotime($time)), array('t' => 'Time the block was created'), array('ro' => true))->addTextField('User', 'user', $user, array('t' => 'User that created the block.'), array('ro' => true))->addTextField('IP Address', 'ip', $ip, array('t' => 'IP Address to block.', 'p' => 'xyz.xyz.xyz.xyz'), array('ro' => true))->addTextField('Length', 'length', $length, array('t' => 'Length of block in days.', 'p' => 'Days to block'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'Length of block is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]', 'd' => false, 'r' => true, 'vt' => 'integer', 't' => 'number'))->addTextField('Reason', 'reason', $reason, array('t' => 'Reason for block.', 'p' => 'Reason'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Reason is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A Reason is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Reason is limited to 255 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 255, validateOn:["blur"]', 'r' => true))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn)); $form->build(); ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">Edit Block</h1> <?php print $form->getForm(); ?> </div> </div>
<?php $config = $this->parent->parent->config->config; $closeBtn = array('a' => array('t' => 'url', 'a' => 'config_view'), 'ic' => 'remove-sign'); $saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'config_edit\', this, \'save\', \'checkSave\')'), 'ic' => 'floppy-disk'); $applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'config_edit\', this, \'apply\', \'checkSave\')'), 'ic' => 'ok-sign'); $form = $page->getPlugin('form', array('config_edit', WebApp::action('core', 'config_edit', true), 'post', 'application/x-www-form-urlencoded', 'checkSave')); $checkSave = 'function checkSave(){' . PHP_EOL; $checkSave .= ' var conf = confirm("Are you sure you wish to save the configuration?\\nThis may break the website!");' . PHP_EOL; $checkSave .= ' if(conf){' . PHP_EOL; $checkSave .= ' return true;' . PHP_EOL; $checkSave .= ' }else{' . PHP_EOL; $checkSave .= ' return false;' . PHP_EOL; $checkSave .= ' }' . PHP_EOL; $checkSave .= '}' . PHP_EOL; $form->setColumns(3, 5)->setIndent(' ')->addScript($checkSave)->addHTML('<h3>Core Settings</h3>', false)->addButtonGroup('Display Errors', 'core_errors', array(array('i' => 'errorsY', 's' => B_T_FAIL, 'v' => 1, 'l' => 'Yes <span class="' . B_ICON . ' ' . B_ICON . '-warning-sign"></span>', 'c' => $config['core']['errors']), array('i' => 'errorsN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['errors']))), array('t' => 'Display PHP errors on pages?'))->addButtonGroup('Maintenance', 'core_maintenance', array(array('i' => 'maintenanceY', 's' => B_T_FAIL, 'v' => 1, 'l' => 'Yes <span class="' . B_ICON . ' ' . B_ICON . '-warning-sign"></span>', 'c' => $config['core']['maintenance']), array('i' => 'maintenanceN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['maintenance']))), array('t' => 'If you enable maintenance mode, only Administrators and above will be able to log in. No pages will be publicly acessible (useful for updating modules)'))->addButtonGroup('Debug Log', 'core_debug', array(array('i' => 'debugY', 's' => B_T_WARNING, 'v' => 1, 'l' => 'Yes', 'c' => $config['core']['debug']), array('i' => 'debugN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['debug']))), array('t' => 'Enabling debug mode prints a log of events at the bottom of the page/as part of the JSON array to aid the debugging of features.'))->addButtonGroup('HTTPS Available', 'core_https_a', array(array('i' => 'httpsaY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes *', 'c' => $config['core']['https']['a']), array('i' => 'httpsaN', 's' => B_T_WARNING, 'v' => 0, 'l' => 'No', 'c' => not($config['core']['https']['a']))), array('t' => 'Lets the site know whether it can use HTTPS for sensitive information exchange.'))->addButtonGroup('HTTPS Force', 'core_https_f', array(array('i' => 'httpsfY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes *', 'c' => $config['core']['https']['f']), array('i' => 'httpsyN', 's' => B_T_WARNING, 'v' => 0, 'l' => 'No', 'c' => not($config['core']['https']['f']))), array('t' => 'If HTTPS is available, then it is recommended to force HTTPS on for the entire site, however, you can disable this if required.'))->addTextField('CDN Server', 'core_cdn', $config['core']['cdn'], array('t' => 'Use / to disable the CDN server, or enter the address for server (including the http(s)://)', 'p' => 'Default: /'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A CDN Server is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addHTML('<h3>Database Settings</h3>', false)->addTextField('Database', 'mysql_db', $config['mysql']['db'], array('t' => 'The database the site uses, advisable not to change this!', 'p' => 'Default: bwsc'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A database name is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addHTML('<h4>Read Server</h4>', false)->addTextField('User', 'mysql_r_user', $config['mysql']['r']['user'], array('t' => 'The user with read access to the database', 'p' => 'Default: bwsc'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A user is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addPasswordField('Password', 'mysql_r_pass', $config['mysql']['r']['pass'], array('t' => 'The password for user with read access to the database. Leave blank to not change', 'p' => 'Default: '))->addTextField('Host', 'mysql_r_host', $config['mysql']['r']['serv'], array('t' => 'The server hosting the database (can be IP or name, as long as the name resolves)', 'p' => 'Default: localhost'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A host is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addTextField('Port', 'mysql_r_port', $config['mysql']['r']['port'], array('t' => 'The port number the host listens on', 'p' => 'Default: 3306'), array('r' => true, 'v' => true, 'vt' => 'integer', 'vm' => array('textfieldInvalidFormatMsg' => array('m' => 'Port must be an integer', 's' => 'danger'), 'textfieldRequiredMsg' => array('m' => 'A port is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addHTML('<h4>Write Server</h4>', false)->addTextField('User', 'mysql_w_user', $config['mysql']['w']['user'], array('t' => 'The user with full access to the database', 'p' => 'Default: bwsc'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A user is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addPasswordField('Password', 'mysql_w_pass', $config['mysql']['w']['pass'], array('t' => 'The password for user with full access to the database. Leave blank not to change', 'p' => 'Default: '))->addTextField('Host', 'mysql_w_host', $config['mysql']['w']['serv'], array('t' => 'The server hosting the database (can be IP or name, as long as the name resolves)', 'p' => 'Default: localhost'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A host is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addTextField('Port', 'mysql_w_port', $config['mysql']['w']['port'], array('t' => 'The port number the host listens on', 'p' => 'Default: 3306'), array('r' => true, 'v' => true, 'vt' => 'integer', 'vm' => array('textfieldInvalidFormatMsg' => array('m' => 'Port must be an integer', 's' => 'danger'), 'textfieldRequiredMsg' => array('m' => 'A port is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addHTML('<h3>reCAPTCHA Settings</h3>', false)->addTextField('Public Key', 'reCAPTCHA_pub', $config['reCAPTCHA']['pub'], array('t' => 'The public key used for the reCAPTCHA service.'))->addTextField('Private Key', 'reCAPTCHA_priv', $config['reCAPTCHA']['priv'], array('t' => 'The private key used for the reCAPTCHA service.'))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn))->build(); ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">System Configuration</h1> <?php print $form->getForm(); ?> </div> </div>
<div class="col-xs-12"> <h1 class="page-header">Install Module</h1> <p>Select which method you are going to use to install the module, then either browse for the zip file, or enter the path where the module is stored.</p> <?php $script = '$("input[name=method]", "#install").change(function(){' . PHP_EOL; $script .= ' if($("input[name=method]:checked", "#install").val()=="zip"){' . PHP_EOL; $script .= ' $("#install\\\\:\\\\:zip_file").removeAttr("disabled");' . PHP_EOL; $script .= ' $("#install\\\\:\\\\:directory").attr("disabled","");' . PHP_EOL; $script .= ' }else{' . PHP_EOL; $script .= ' $("#install\\\\:\\\\:zip_file").attr("disabled","");' . PHP_EOL; $script .= ' $("#install\\\\:\\\\:directory").removeAttr("disabled");' . PHP_EOL; $script .= ' }' . PHP_EOL; $script .= '});' . PHP_EOL; $script .= '$("#install").submit(function(){' . PHP_EOL; $script .= ' if($("input[name=method]:checked", "#install").val()=="zip"){' . PHP_EOL; $script .= ' $("#install\\\\:\\\\:zip_file").removeAttr("disabled");' . PHP_EOL; $script .= ' $("#install\\\\:\\\\:directory").attr("disabled","");' . PHP_EOL; $script .= ' }else{' . PHP_EOL; $script .= ' $("#install\\\\:\\\\:zip_file").attr("disabled","");' . PHP_EOL; $script .= ' $("#install\\\\:\\\\:directory").removeAttr("disabled");' . PHP_EOL; $script .= ' }' . PHP_EOL; $script .= '});' . PHP_EOL; $installBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'button', 'a' => 'submit'), 'ic' => 'install'); $form = $page->getPlugin('form', array('install', WebApp::action('modules', 'pre_install', false), 'post', 'multipart/form-data', '')); $form->setIndent(6)->addOptionGrid('radio', 'Install Method', 'method', array(array('i' => 'zip', 'l' => 'Upload Zip', 'v' => 'zip', 'c' => false, 'd' => false), array('i' => 'dir', 'l' => 'From Directory', 'v' => 'dir', 'c' => false, 'd' => false)), array('t' => 'Select the mode to install the module'), array())->addFileUpload('Zip upload', 'zip_file', array('t' => 'Browse to the zip file containing the module', 'p' => 'C:\\Users\\Someone\\module.zip'), array('d' => true))->addTextField('Directory', 'directory', '', array('t' => 'Path to the directory containing the module', 'p' => '/temp/module'), array('d' => true))->addBtnLine(array('install' => $installBtn))->addHTML('<iframe id="install_tgt" name="install_tgt" src="#" style="width:0;height:0;border:0px solid #fff;"></iframe>')->addScript($script); $form->build(); print $form->getForm(); ?> </div> </div>
$module_query->execute(); $module_query->bind_result($mname, $module_id); $module_data = array(); while ($module_query->fetch()) { $module_data[$module_id] = $mname; } $modules = array('-1' => array('v' => '-1', 'n' => 'Select a module', 's' => true, 'd' => true)); foreach ($module_data as $k => $v) { $modules[$k]['v'] = $k; $modules[$k]['n'] = $v; $modules[$k]['s'] = false; $modules[$k]['d'] = false; } $closeBtn = array('a' => array('t' => 'url', 'a' => '../menu_edit/' . $parentID), 'ic' => 'remove-sign'); $saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'menu_add\', this, \'save\')'), 'ic' => 'floppy-disk'); $form = $page->getPlugin('form', array('menu_add', WebApp::action('core', 'menu_addsub', true), 'post')); $form->setColumns(3, 9)->setIndent(' ')->addHiddenField('parent', $parentID)->addSelect('Module', 'module', $modules, array('t' => 'The module for the menu item.'), array('v' => true, 'vm' => array('selectRequiredMsg' => array('m' => 'A module is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]', 'r' => true))->addSelect2('Page', 'PID', '', array('t' => 'The page the menu item will link to. * denotes admin page'), array('r' => true))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn)); $form->build(); ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">New Dropdown Menu Item</h1> <?php print $form->getForm(); ?> </div> </div> <script type="text/javascript"> var module_id = ''; $('[name="module"]').change(function(e) {
alert("Please select one user only to edit"); } return false; }); }) </script> </div> </div> </div> </div> <?php $delete_modal = $page->getPlugin('modalconf', array('delete', 'user', WebApp::action('user', 'user_delete', true), 'post')); $delete_modal->addDefaultConfig(); $delete_modal->form->addPasswordField('Your Password', 'pwd', '', array('t' => 'Your password', 'p' => 'Your Password'), array('t' => 'password', 'w' => true, 'r' => true)); $delete_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Delete', 'trash')->build(); print $delete_modal->getModal(); $enable_modal = $page->getPlugin('modalconf', array('enable', 'user', WebApp::action('user', 'user_enable', true), 'post')); $enable_modal->addDefaultConfig(); $enable_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('success', 'Enable', 'ok-sign')->build(); print $enable_modal->getModal(); $disable_modal = $page->getPlugin('modalconf', array('disable', 'user', WebApp::action('user', 'user_disable', true), 'post')); $disable_modal->addDefaultConfig(); $disable_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Disable', 'ban-circle')->build(); print $disable_modal->getModal(); $setpassword_modal = $page->getPlugin('modalconf', array('set password for', 'user', WebApp::action('user', 'setpassword', true), 'post')); $setpassword_modal->addDefaultConfig(); $setpassword_modal->form->setColumns(4, 5, 3)->addPasswordField('New Password', 'n_pwd', '', array('t' => 'The users\' new password', 'p' => 'New Password'), array('t' => 'password', 'v' => true, 'w' => true, 'r' => true))->addTextField('Confirm Password', 'c_pwd', '', array('t' => 'Confirm user\'s new password.', 'p' => 'Confirm Password'), array('t' => 'password', 'vt' => 'confirm', 'v' => true, 'vm' => array('confirmInvalidMsg' => array('m' => 'Passwords do not match.', 's' => 'danger')), 'vc' => 'user_set_password_for_form\\:\\:n_pwd', 'vo' => 'validateOn:["blur", "change"]')); $setpassword_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('warning', 'Set Password', 'lock')->build(); print $setpassword_modal->getModal();
<div class="row pane"> <div class="col-sm-12 col-md-11 col-lg-11 col-lg-offset-1 col-md-offset-1"> <h1 class="page-header">Change my Password</h1> <?php $cancelBtn = array('s' => B_T_DEFAULT, 'a' => array('t' => 'url', 'a' => '../'), 'ic' => 'remove'); $changeBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'change_mod();'), 'ic' => 'ok'); $form = $page->getPlugin('form', array('password', WebApp::action('user', 'password', true), 'post')); $form->setIndent(' ')->addPasswordField('Old Password', 'o_pwd', '', array('t' => 'Enter your old password', 'p' => 'Old Password'), array('r' => true))->addPasswordField('New Password', 'n_pwd', '', array('t' => 'Enter your new password', 'p' => 'New Password'), array('r' => true, 'v' => true, 'w' => true))->addTextField('Confirm Password', 'c_pwd', '', array('t' => 'Confirm your new password.', 'p' => 'Confirm Password'), array('t' => 'password', 'vt' => 'confirm', 'v' => true, 'vm' => array('confirmInvalidMsg' => array('m' => 'Passwords do not match.', 's' => 'danger')), 'vc' => 'password\\:\\:n_pwd', 'vo' => 'validateOn:["blur"]'))->addBtnLine(array('cancel' => $cancelBtn, 'change' => $changeBtn)); $form->build(); print $form->getForm(); $checkMod = $page->getPlugin('modalconf', array('change', 'password', WebApp::action('user', 'password', true), 'post')); $checkMod->setContent('<p>Are you sure you want to change your password?</p>')->setDefaultModal()->setRightBtn('primary', 'Change', 'ok', 'button', 'processForm(\'password\', this, \'change\');$("#change_passwords").modal("hide");')->addShowScript()->build(); print $checkMod->getModal(); ?> </div> </div>
} else { $groups[$k]['s'] = false; } $groups[$k]['d'] = 0; } if ($publish_f === NULL) { $publish_f = ''; } else { $publish_f = date(DATET_SQL, strtotime($publish_f)); } if ($publish_u === NULL) { $publish_u = ''; } else { $publish_u = date(DATET_SQL, strtotime($publish_u)); } $closeBtn = array('a' => array('t' => 'url', 'a' => '../article_view'), 'ic' => 'remove-sign'); $saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'article_edit\', this, \'save\')'), 'ic' => 'floppy-disk'); $applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'article_edit\', this, \'apply\')'), 'ic' => 'ok-sign'); $form = $page->getPlugin('form', array('article_edit', WebApp::action('article', 'user_edit', true), 'post')); $form->setIndent(' ')->setColumns(2, 10)->addTextField('ID', 'id', $ID, array('t' => 'ID of Article'), array('ro' => true))->addTextField('Title', 'title', $title, array('t' => 'Title of Article', 'p' => 'Article Title'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'An Article Title is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'An Article Title is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Article title is limited to 250 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 250, validateOn:["blur"]'))->addTextField('Article ID', 'aid', $aid, array('t' => 'Article ID'), array('ro' => true))->addButtonGroup('Published', 'publish', array(array('i' => 'publishY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes <span class="' . B_ICON . ' ' . B_ICON . '-eye-open"></span>', 'c' => $publish), array('i' => 'publishN', 's' => B_T_FAIL, 'v' => 0, 'l' => 'No <span class="' . B_ICON . ' ' . B_ICON . '-eye-close"></span>', 'c' => not($publish))), array('t' => 'An article has to be published (regardless of the permission settings) before it can be viewed'))->addDateTime('Publish From', 'p_from', $publish_f, array('t' => 'Date/time to start publishing, leave blank for always'))->addDateTime('Publish To', 'p_to', $publish_u, array('t' => 'Date/time to finish publishing, leave blank for always'))->addTextArea('Article', 'article', $article, 20, array('t' => 'The article'), array('ck' => true, 'ckt' => 'Full'))->addSelect('User', 'user', $users, array('t' => 'Select the owner of this article (this user gains the user permissions)'))->addSelect('Group', 'group', $groups, array('t' => 'Select the owner of this article (this group gains the group permissions)'))->addTextField('Revision', 'rev', $revision, array('t' => 'Number of times this article has been revised.'), array('ro' => true))->addTextField('Hits', 'hits', $hits, array('t' => 'Number of times this article has been loaded.'), array('ro' => true))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn)); $form->build(); ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">Edit Article</h1> <?php print $form->getForm(); ?> </div> </div>
<?php $closeBtn = array('a' => array('t' => 'url', 'a' => 'option_view'), 'ic' => 'remove-sign'); $saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'option_add\', this, \'save\')'), 'ic' => 'floppy-disk'); $form = $page->getPlugin('form', array('option_add', WebApp::action('core', 'option_add', true), 'post')); $form->setIndent(' ')->setColumns(2, 6)->addTextField('Option Name', 'name', '', array('t' => 'Option name.', 'p' => 'Name'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A name is required.', 's' => 'danger'), 'textfieldMinCharsMsg' => array('m' => 'A name is required.', 's' => 'danger'), 'textfieldMaxCharsMsg' => array('m' => 'Name is limited to 100 characters.', 's' => 'danger')), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'd' => false, 'r' => true))->addTextArea('Value', 'value', '', 6, array('t' => 'Value for option.', 'p' => 'Option'), array('v' => true, 'vm' => array('textareaRequiredMsg' => array('m' => 'An option value is required.', 's' => B_T_FAIL), 'textareaMinCharsMsg' => array('m' => 'An option value is required.', 's' => B_T_FAIL), 'textareaMaxCharsMsg' => array('m' => 'Option values are limited to 5000 characters.', 's' => B_T_FAIL)), 'vo' => 'maxChars: 5000, userCharacterMasking:false, validateOn:["blur", "change"]', 'c' => true, 'r' => true))->addTextArea('Description', 'desc', '', 3, array('t' => 'Description of Option', 'p' => 'Option Description'), array('v' => true, 'vm' => array('textareaMaxCharsMsg' => array('m' => 'Option description is limited to 250 chars.', 's' => B_T_FAIL)), 'vo' => 'maxChars: 250, useCharacterMasking:false, validateOn:["blur", "change"]', 'c' => true, 'r' => false))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn)); $form->build(); ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">New Option</h1> <?php print $form->getForm(); ?> </div> </div>
}); $("#edit_btn").click(function(e){ var groups = $('.groups_check').filter(":checked") if(groups.length==1){ var group_id = groups.first().val(); document.location.href = "group_edit/"+group_id; }else if(groups.length>1){ alert("Please select one group only to edit"); } return false; }); }) </script> </div> </div> </div> </div> <?php $delete_modal = $page->getPlugin('modalconf', array('delete', 'group', WebApp::action('user', 'group_del', true), 'post')); $delete_modal->addDefaultConfig(); $delete_modal->form->addPasswordField('Your Password', 'pwd', '', array('t' => 'Your password', 'p' => 'Your Password'), array('t' => 'password', 'w' => true, 'r' => true)); $delete_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Delete', 'trash')->build(); print $delete_modal->getModal(); $enable_modal = $page->getPlugin('modalconf', array('enable', 'group', WebApp::action('user', 'group_enable', true), 'post')); $enable_modal->addDefaultConfig(); $enable_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('success', 'Enable', 'ok-sign')->build(); print $enable_modal->getModal(); $disable_modal = $page->getPlugin('modalconf', array('disable', 'group', WebApp::action('user', 'group_disable', true), 'post')); $disable_modal->addDefaultConfig(); $disable_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Disable', 'ban-circle')->build(); print $disable_modal->getModal();
<?php $config = $this->parent->parent->config->config; $closeBtn = array('a' => array('t' => 'url', 'a' => '../'), 'ic' => 'remove-sign'); $form = $page->getPlugin('form', array('system_info', WebApp::action('core', 'system_info', true), 'post')); $form->setColumns(3, 9)->setIndent(' ')->addHTML('<h3>Web Server Info</h3>', false)->addTextField('IP', 'server_addr', Server::get('Server_Addr'), array('t' => 'IP Address of the server'), array('ro' => true))->addTextField('Name', 'server_name', Server::get('Server_Name'), array('t' => 'Server host name'), array('ro' => true))->addTextField('Software', 'server_software', Server::get('Server_Software'), array('t' => 'Software powering the server'), array('ro' => true))->addTextField('Signature', 'server_signature', array_pop(GUMP::xss_clean(array(Server::get('Server_Signature')))), array('t' => ''), array('ro' => true))->addTextField('Port', 'server_port', Server::get('Server_Port'), array('t' => 'Port the server is listening on'), array('ro' => true))->addTextField('Gateway Interface', 'server_gateway', Server::get('Gateway_Interface'), array('t' => 'How the web server is communicating with PHP'), array('ro' => true))->addTextField('Protocol', 'protocol', Server::get('Server_Protocol'), array('t' => 'Protocol used to communicate between the web server and client'), array('ro' => true))->addTextField('PHP Version', 'php_version', phpversion(), array('t' => 'Software powering the website'), array('ro' => true))->addTextField('HTTPS', 'server_https', Server::get('HTTPS'), array('t' => 'HTTPS Status of the server'), array('ro' => true))->addHTML('<h3>Database</h3>', false)->addHTML('<h4>Read Server</h4>', false)->addTextField('Connection', 'mysqlr_con', $this->mySQL_r->host_info, array('t' => ''), array('ro' => true))->addTextField('Version', 'mysqlr_ver', $this->mySQL_r->server_info, array('t' => ''), array('ro' => true))->addTextField('Client', 'mysqlr_cli', $this->mySQL_r->client_info, array('t' => ''), array('ro' => true))->addHTML('<h4>Write Server</h4>', false)->addTextField('Connection', 'mysqlw_con', $this->mySQL_w->host_info, array('t' => ''), array('ro' => true))->addTextField('Version', 'mysqlw_ver', $this->mySQL_w->server_info, array('t' => ''), array('ro' => true))->addTextField('Client', 'mysqlw_cli', $this->mySQL_w->client_info, array('t' => ''), array('ro' => true)); $form->build(); ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">System Information</h1> <?php print $form->getForm(); ?> </div> </div>
$row['username'] = Table::addCell($username); $row['ip'] = Table::addCell($ip); $row['created'] = Table::addCell(date(DATET_SHORT, strtotime($created))); $row['lpr'] = Table::addCell(date(DATET_SHORT, strtotime($lpr))); $row['del'] = Table::addCell('<a href="#" onclick="processData(\'/action/user/session_destroy/' . $session_id . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-remove-sign"</a>'); $row['lock'] = Table::addCell('<a href="#" onclick="processData(\'/action/user/session_lock/' . $session_id . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-lock"</a>'); $session_view->addRow($row); } $session_view->build(); print $session_view->getTable(); ?> </div> </div> </div> </div> <script type="text/javascript"> <?php $check = new TableCheck(); $check->setType('session')->create(); print $check->getScript(); ?> </script> <?php $destroy_mod = $page->getPlugin('modalconf', array('destroy', 'session', WebApp::action('user', 'session_destroy?m=m', true), 'post')); $destroy_mod->addDefaultConfig(); $destroy_mod->setDefaultContent()->setDefaultModal()->setRightBtn('danger', 'Destroy', 'remove-sign')->build(); print $destroy_mod->getModal(); $lock_mod = $page->getPlugin('modalconf', array('lock', 'session', WebApp::action('user', 'session_lock?m=m', true), 'post')); $lock_mod->addDefaultConfig(); $lock_mod->setDefaultContent()->setDefaultModal()->setRightBtn('danger', 'Lock', 'lock')->build(); print $lock_mod->getModal();
$pdata['l'] = $title; $pdata['v'] = $ID; $pdata['d'] = false; if (in_array($ID, $gpages)) { $pdata['c'] = true; } else { $pdata['c'] = false; } $pages[ucfirst($module)][$ID] = $pdata; } } ksort($pages); $closeBtn = array('a' => array('t' => 'url', 'a' => '../group_view'), 'ic' => 'remove-sign'); $saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'group_edit\', this, \'save\')'), 'ic' => 'floppy-disk'); $applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'group_edit\', this, \'apply\')'), 'ic' => 'ok-sign'); $form = $page->getPlugin('form', array('group_edit', WebApp::action('user', 'group_edit', true), 'post')); $form->setIndent(' '); $form->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn)); $form->addTextField('Group ID', 'id', $GID, array('t' => 'ID of Group (Unique)'), array('ro' => true)); $form->addTextField('Name', 'name', $name, array('t' => 'Name of Group (Unique)', 'p' => 'Group Name'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Group name is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A Group name is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Group name is limited to 100 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'r' => true)); $form->addTextArea('Description', 'desc', $desc, 3, array('t' => 'Description of Group', 'p' => 'Group Description'), array('v' => true, 'vm' => array('textareaMaxCharsMsg' => array('m' => 'Group description is limited to 250 chars.', 's' => B_T_FAIL)), 'vo' => 'maxChars: 250, useCharacterMasking:false, validateOn:["blur", "change"]', 'c' => true, 'r' => false)); $form->addSelect('Type', 'type', $types, array('t' => 'Primary Groups are the base group from which additional privileges are added via Secondary Groups.'), array('r' => true, 'v' => true, 'vm' => array('selectRequiredMsg selectInvalidMsg' => array('s' => B_T_FAIL, 'm' => 'A group type is required.')), 'vo' => 'validateOn:["blur"]')); $form->addButtonGroup('Enabled', 'enabled', array(array('i' => 'enabledY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes', 'c' => $enabled), array('i' => 'enabledN', 's' => B_T_FAIL, 'v' => 0, 'l' => 'No', 'c' => not($enabled))), array('t' => 'Disabling a group automatically logs all users that belong to that group out and they cannot log back in.')); $form->addCollapseOptGrid('check', 'Pages', 'pages[]', $pages, array('t' => 'A checked box indicates that this group is able to access that page. Please note, when calculating page access privileges, TTP (True Takes Priority) is used. This means if a user is granted access from one group and barred from another, they will still be able to access that page.'), array('r' => true, 'v' => false)); $form->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn)); $form->build(); ?> <div class="row pane"> <div class="col-xs-12"> <?php
<div class="col-sm-12 col-md-11 col-lg-11 col-lg-offset-1 col-md-offset-1"> <h1 class="page-header">Edit my Details</h1> <?php $userID = $page->parent->user->getUserID(); $user_query = $mySQL_r->prepare("SELECT `username`,`f_name`,`s_name`,`email`,`pwd_reset` FROM `core_users` WHERE `id`=?"); if ($user_query === false) { print '<h2>Failed to load details!</h2>' . PHP_EOL; } else { $user_query->bind_param('i', $userID); $user_query->execute(); $user_query->bind_result($username, $f_name, $s_name, $email, $passwords); $user_query->store_result(); $user_query->fetch(); $cancelBtn = array('s' => B_T_DEFAULT, 'a' => array('t' => 'url', 'a' => '../'), 'ic' => 'remove'); $changeBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'details\', this, \'change\');'), 'ic' => 'floppy-disk'); $form = $page->getPlugin('form', array('details', WebApp::action('user', 'change_details', true), 'post')); $form->setIndent(' ')->addHiddenField('userid', $userID, 'userid')->addTextField('First Name', 'f_name', $f_name, array('t' => 'Your First Name', 'p' => 'First Name'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A First Name is required.', 's' => 'danger'), 'textfieldMinCharsMsg' => array('m' => 'A First Name is required.', 's' => 'danger'), 'textfieldMaxCharsMsg' => array('m' => 'First Name is limited to 100 characters.', 's' => 'danger')), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'd' => false, 'r' => true))->addTextField('Surname', 's_name', $s_name, array('t' => 'Your Surname.', 'p' => 'Surname'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Surname is required.', 's' => 'danger'), 'textfieldMinCharsMsg' => array('m' => 'A Surname is required.', 's' => 'danger'), 'textfieldMaxCharsMsg' => array('m' => 'Surname is limited to 100 characters.', 's' => 'danger')), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'd' => false, 'r' => true))->addTextField('Username', 'username', $username, array('t' => 'Username. Used for logging in.', 'p' => 'Username'), array('v' => false, 'd' => false, 'ro' => true))->addBtnLine(array('cancel' => $cancelBtn, 'Save' => $changeBtn)); $form->build(); print $form->getForm(); /*$checkMod = $page->getPlugin('modalconf', array('change', 'email', WebApp::action('user','e,ao;', true), 'post')); $checkMod ->setContent('<p>Are you sure you want to change your email address?<br />If so, your account will be deactivated and a reactivation email will be sent to the new address.</p>') ->setDefaultModal() ->setTitle('Change Email Address?') ->setRightBtn('primary','Change','ok', 'button', 'processForm(\'details\', this, \'change\');$(\'#change_emails\').modal(\'hide\');') ->addShowScript() ->build(); print $checkMod->getModal();*/ } ?> </div>
<div class="row pane"> <div class="col-xs-12"> <div class="row"> <div class="col-xs-12"> <h2>Activate Account</h2> </div> </div> <div class="row"> <div class="col-xs-12"> <p>To activate your account, copy and paste the activation code from your activation email and paste into the box below. Set your new password and click activate.</p> <p>If you did not get this email within 30 minutes, please <a href="/user/resend">click here</a> to resend the activation email.</p> <?php $activateBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'activate\', this, \'activate\')'), 'ic' => 'ok-sign'); $form = $page->getPlugin('form', array('activate', WebApp::action('user', 'activate', true), 'post')); $form->setIndent(' ')->setColumns(3, 6, 3)->addTextField('Code', 'code', WebApp::get('code'), array('t' => 'Copy and paste your activation code here', 'p' => 'aaaabbbbccccddddeeeeffff11112222'), array('r' => true))->addPasswordField('New Password', 'n_pwd', '', array('t' => 'Enter your new password', 'p' => 'New Password'), array('r' => true, 'v' => true, 'w' => true))->addTextField('Confirm Password', 'c_pwd', '', array('t' => 'Confirm your new password.', 'p' => 'Confirm Password'), array('t' => 'password', 'vt' => 'confirm', 'v' => true, 'vm' => array('confirmInvalidMsg' => array('m' => 'Passwords do not match.', 's' => 'danger')), 'vc' => 'activate\\:\\:n_pwd', 'vo' => 'validateOn:["blur"]'))->addBtnLine(array('activate' => $activateBtn)); $form->build(); print $form->getForm(); ?> </div> </div> </div> </div>
} if ($this->accessAdminPage(42)) { $row['edit'] = Table::addCell('<a href="menu_edit/' . $MID . '/"><span class="' . B_ICON . ' ' . B_ICON . '-edit"></span></a>'); } if ($this->accessAdminPage(42)) { $row['delete'] = Table::addCell('<a href="#" onclick="processData(\'/action/core/menu_remove/' . $MID . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-remove-sign"></span></a>'); } $menu->addRow($row); $rown++; } $menu_query->free_result(); $menu->build(); print $menu->getTable(); ?> </div> </div> </div> </div> <script type="text/javascript"> <?php $check = new TableCheck(); $check->setType('block')->addRequireOne('#edit_btn')->addRequireOneBtn('#edit_btn', 'ipblock_edit')->create(); print $check->getScript(); ?> </script> <?php $delete_mod = $page->getPlugin('modalconf', array('delete', 'block', WebApp::action('core', 'ipblock_delete', true), 'post')); $delete_mod->addDefaultConfig(); $delete_mod->setDefaultContent()->setDefaultModal()->setRightBtn('danger', 'Delete', 'trash')->build(); print $delete_mod->getModal();
<?php if (WebApp::get('cat4') === NULL || is_numeric(WebApp::get('cat4')) === false) { $page->setStatus(404); } $ID = intval(WebApp::get('cat4')); $location = $page->getResource('location'); if ($location->getLocation($ID) === false) { $page->setStatus(404); return false; } $closeBtn = array('a' => array('t' => 'url', 'a' => '../'), 'ic' => 'remove-sign'); $saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'location_edit\', this, \'save\')'), 'ic' => 'floppy-disk'); $applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'location_edit\', this, \'apply\')'), 'ic' => 'ok-sign'); $form = $page->getPlugin('form', array('location_edit', WebApp::action('location', 'edit', true), 'post')); $form->setIndent(' '); $form->addTextField('Location ID', 'id', $ID, array('t' => 'ID of Location.', 'p' => 'ID'), array('ro' => true, 'd' => false))->addTextField('Venue Name', 'name', $location->name, array('t' => 'Name of venue', 'p' => 'Venue'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Venue Name is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A Venu Name is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Venu Name is limited to 100 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'r' => true))->addTextField('Address Line 1', 'addr1', $location->address['line1'], array('t' => 'Address Line 1', 'p' => 'Address Line 1'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'Address Line 1 is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'Address Line 1 is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Address Line 1 is limited to 250 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 250, validateOn:["blur"]', 'r' => true))->addTextField('Address Line 2', 'addr2', $location->address['line2'], array('t' => 'Address Line 2', 'p' => 'Address Line 2'), array('v' => true, 'vm' => array('textfieldMaxCharsMsg' => array('m' => 'Address Line 2 is limited to 250 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 250, validateOn:["blur"]'))->addTextField('Town/City', 'city', $location->address['city'], array('t' => 'City', 'p' => 'City'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A City is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A City is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'City is limited to 100 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'r' => true))->addTextField('County', 'county', $location->address['county'], array('t' => 'County', 'p' => 'County'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A County is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A County is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'County is limited to 100 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'r' => true))->addTextField('Postcode', 'post', $location->address['postcode'], array('t' => 'Postcode', 'p' => 'AB012CD'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Postcode is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A Postcode is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Postcode is limited to 7 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 7, validateOn:["blur"]', 'r' => true))->addTextField('Phone Number', 'phone', $location->phone['number'], array('t' => 'Phone', 'p' => '01234 123455'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A phone number is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A phone number is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Phone number is limited to a max of 15 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 15, validateOn:["blur"]', 't' => 'tel', 'vt' => 'text', 'r' => true))->addTextField('Phone extension', 'ext', $location->phone['ext'], array('t' => 'Extension for phone (if required)', 'p' => 'Extension Number'), array('v' => true, 'vm' => array('textfieldMaxCharsMsg' => array('m' => 'Extension is limited to 11 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 50, validateOn:["blur"]'))->addButtonGroup('Google Maps', 'maps', array(array('i' => 'mapsY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes', 'c' => $location->map), array('i' => 'mapsN', 's' => B_T_FAIL, 'v' => 0, 'l' => 'No', 'c' => !$location->map)), array('t' => 'Enable Google Maps integration on the location\'s page.'))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn)); $form->build(); ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">Edit Location</h1> <?php print $form->getForm(); ?> </div> </div>
<div class="row pane"> <div class="col-xs-12"> <div class="row"> <div class="col-xs-12"> <h2>Resend Activation</h2> </div> </div> <div class="row"> <div class="col-xs-12"> <p>Fill out the form below. You can enter either your username or email address, or both. Then click 'Resend' to resend the activation email for your account.<br /> <small>(Please note that activation codes last for 7 days and that resending the activation email will void any other codes)</small></p> <?php $resendBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'resend\', this, \'resend\')'), 'ic' => 'send'); $form = $page->getPlugin('form', array('resend', WebApp::action('user', 'resend', true), 'post')); $form->setIndent(' ')->setColumns(3, 9)->addTextField('Username', 'user', '', array('t' => 'Your username', 'p' => 'username'))->addTextField('Email', 'email', '', array('t' => 'Your email address', 'p' => '*****@*****.**'))->addBtnLine(array('resend' => $resendBtn)); $form->build(); print $form->getForm(); ?> </div> </div> </div> </div>
$row['ns'] = Table::addCell($namespace, '', '', true); $row['event'] = Table::addCell($event); $event_view->addRow($row); } $event_query->free_result(); } $event_view->build(); print $event_view->getTable(); ?> <script type="text/javascript"> <?php $check = new TableCheck(); $check->setType('event')->addRequire('#event_delete_btn')->create(); print $check->getScript(); ?> </script> </div> </div> </div> </div> <?php if ($user->inGroup(1)) { $delete_modal = $page->getPlugin('modalconf', array('delete', 'event', WebApp::action('core', 'event_delete', true), 'post')); $delete_modal->addDefaultConfig()->setDefaultContent()->setDefaultModal()->setRightBtn('warning', 'Delete', 'trash')->build(); print $delete_modal->getModal(); $obliterate = $page->getPlugin('modalconf', array('clear', 'event', WebApp::action('core', 'event_clear', true), 'post')); $obliterate->addForm()->form->build(); $obliterate->setContent('<p>Are you sure you want to clear the event log?</p>' . $obliterate->form->getForm())->setDefaultModal()->setRightBtn('danger', 'Clear', 'trash')->addShowScript()->build(); print $obliterate->getModal(); }
<?php $config = $this->parent->parent->config->config; $closeBtn = array('a' => array('t' => 'url', 'a' => '../'), 'ic' => 'remove-sign'); $editBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => 'config_edit'), 'ic' => 'edit'); $form = $page->getPlugin('form', array('config_view', WebApp::action('core', 'config', true), 'post')); $form->setColumns(3, 9)->setIndent(' ')->addHTML('<h3>Core Settings</h3>', false)->addButtonGroup('Display Errors', 'core_errors', array(array('i' => 'errorsY', 's' => B_T_FAIL, 'v' => 1, 'l' => 'Yes <span class="' . B_ICON . ' ' . B_ICON . '-warning-sign"></span>', 'c' => $config['core']['errors'], 'd' => true), array('i' => 'errorsN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['errors']), 'd' => true)), array('t' => 'Display PHP errors on pages?'), array('d' => true))->addButtonGroup('Maintenance', 'core_maintenance', array(array('i' => 'maintenanceY', 's' => B_T_FAIL, 'v' => 1, 'l' => 'Yes <span class="' . B_ICON . ' ' . B_ICON . '-warning-sign"></span>', 'c' => $config['core']['maintenance'], 'd' => true), array('i' => 'maintenanceN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['maintenance']), 'd' => true)), array('t' => 'If you enable maintenance mode, only Administrators and above will be able to log in. No pages will be publicly acessible (useful for updating modules)'), array('d' => true))->addButtonGroup('Debug Log', 'core_debug', array(array('i' => 'debugY', 's' => B_T_WARNING, 'v' => 1, 'l' => 'Yes', 'c' => $config['core']['debug'], 'd' => true), array('i' => 'debugN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['debug']), 'd' => true)), array('t' => 'Enabling debug mode prints a log of events at the bottom of the page/as part of the JSON array to aid the debugging of features.'), array('d' => true))->addButtonGroup('HTTPS Available', 'core_https_a', array(array('i' => 'httpsaY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes *', 'c' => $config['core']['https']['a'], 'd' => true), array('i' => 'httpsaN', 's' => B_T_WARNING, 'v' => 0, 'l' => 'No', 'c' => not($config['core']['https']['a']), 'd' => true)), array('t' => 'Lets the site know whether it can use HTTPS for sensitive information exchange.'), array('d' => true))->addButtonGroup('HTTPS Force', 'core_https_f', array(array('i' => 'httpsfY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes *', 'c' => $config['core']['https']['f'], 'd' => true), array('i' => 'httpsyN', 's' => B_T_WARNING, 'v' => 0, 'l' => 'No', 'c' => not($config['core']['https']['f']), 'd' => true)), array('t' => 'If HTTPS is available, then it is recommended to force HTTPS on for the entire site, however, you can disable this if required.'), array('d' => true))->addTextField('CDN Server', 'core_cdn', $config['core']['cdn'], array('t' => 'Use / to disable the CDN server, or enter the address for server (including the http(s)://)'), array('ro' => true))->addHTML('<h3>Database Settings</h3>', false)->addTextField('Database', 'mysql_db', $config['mysql']['db'], array('t' => 'The database the site uses, advisable not to change this!'), array('ro' => true))->addHTML('<h4>Read Server</h4>', false)->addTextField('User', 'mysql_r_user', $config['mysql']['r']['user'], array('t' => 'The user with read access to the database'), array('ro' => true))->addTextField('Host', 'mysql_r_host', $config['mysql']['r']['serv'], array('t' => 'The server hosting the database (can be IP or name, as long as the name resolves)'), array('ro' => true))->addTextField('Port', 'mysql_r_port', $config['mysql']['r']['port'], array('t' => 'The port number the host listens on'), array('ro' => true))->addHTML('<h4>Write Server</h4>', false)->addTextField('User', 'mysql_w_user', $config['mysql']['w']['user'], array('t' => 'The user with full access to the database'), array('ro' => true))->addTextField('Host', 'mysql_w_host', $config['mysql']['w']['serv'], array('t' => 'The server hosting the database (can be IP or name, as long as the name resolves)'), array('ro' => true))->addTextField('Port', 'mysql_w_port', $config['mysql']['w']['port'], array('t' => 'The port number the host listens on'), array('ro' => true))->addHTML('<h3>reCAPTCHA Settings</h3>', false)->addTextField('Public Key', 'reCAPTCHA_pub', $config['reCAPTCHA']['pub'], array('t' => 'The public key used for the reCAPTCHA service.'), array('ro' => true))->addTextField('Private Key', 'reCAPTCHA_priv', $config['reCAPTCHA']['priv'], array('t' => 'The private key used for the reCAPTCHA service.'), array('ro' => true)); if ($this->accessAdminPage(21)) { $form->addBtnLine(array('close' => $closeBtn, 'edit' => $editBtn)); } else { $form->addBtnLine(array('close' => $closeBtn)); } $form->addHTML('<small>* - Recommended setting</small>', false)->build(); ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header">System Configuration</h1> <?php print $form->getForm(); ?> </div> </div>
<?php $loginBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'submit'), 'ic' => 'login'); $registerBtn = array('a' => array('t' => 'url', 'a' => '/user/register')); $forgotBtn = array('a' => array('t' => 'url', 'a' => '/user/recover'), 'l' => 'Forgot Details?'); $return = WebApp::get('r') !== NULL ? WebApp::get('r') : ''; $form = $page->getPlugin('form', array('u_login', WebApp::action('user', 'login'), 'post')); $form->setIndent(' ')->setAutofill(true)->setColumns(3, 6)->addHiddenField('r', $return)->addHTML(' <div class="col-xs-12">' . PHP_EOL . ' <h2 class="form-signin-heading">' . $page->getTitle() . '</h2>' . PHP_EOL . ' </div>' . PHP_EOL)->addTextField('Username/Email', 'user', '', array('t' => 'Your username or email address.', 'p' => 'Username/Email'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Username or Email is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur", "change"]'))->addPasswordField('Password', 'pwd', '', array('t' => 'Your password', 'p' => 'Password'), array('t' => 'password', 'r' => true))->addBtnLine(array('login' => $loginBtn))->addBtnLine(array('register' => $registerBtn, 'forgot' => $forgotBtn))->build(); ?> <div class="row pane"> <div class="col-sm-12 col-md-11 col-lg-11 col-lg-offset-1 col-md-offset-1"> <?php print $form->getForm(); ?> </div> </div>
$row['lastrun'] = Table::addCell($last_run, '', '', true); $row['desc'] = Table::addCell($desc); if ($this->accessAdminPage(52)) { $row['edit'] = Table::addCell('<a href="cron_edit/' . $id . '"><span class="' . B_ICON . ' ' . B_ICON . '-edit"></span></a>'); } if ($this->inGroup(54, true)) { $row['run'] = Table::addCell('<a href="/action/core/cron_run?j=' . $id . '" onclick="processData(this.href);return false;"><span class="' . B_ICON . ' ' . B_ICON . '-play"></span></a>'); } $jobs->addRow($row); } $job_query->free_result(); $jobs->build(); print $jobs->getTable(); ?> </div> </div> </div> </div> <script type="text/javascript"> <?php $check = new TableCheck(); $check->setType('job')->addRequireOne('#edit_btn')->addRequireOneBtn('#edit_btn', 'cron_edit')->create(); print $check->getScript(); ?> </script> <?php $delete_mod = $page->getPlugin('modalconf', array('delete', 'job', WebApp::action('core', 'cron_delete', true), 'post')); $delete_mod->addDefaultConfig(); $delete_mod->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Delete', 'trash')->build(); print $delete_mod->getModal();
} $(".location_need_check").removeClass("disabled"); }else{ $("#edit_btn").addClass("disabled"); $(".location_need_check").addClass("disabled"); } }); $("#edit_btn").click(function(e){ var locations = $('.locations_check').filter(":checked") if(locations.length==1){ var id = locations.first().val(); document.location.href = "edit/"+id; }else if(locations.length>1){ alert("Please select one location only to edit"); } return false; }); }) </script> <div> </div> </div> </div> <?php if ($this->inGroup(2, true)) { $delete_modal = $page->getPlugin('modalconf', array('delete', 'location', WebApp::action('location', 'delete', true), 'post')); $delete_modal->addDefaultConfig(); $delete_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Delete', 'trash')->build(); print $delete_modal->getModal(); }
$uninstall = $uninstall == 1 ? 'Yes' : 'No'; } } else { $page->setStatus(404); } } else { $page->setStatus(500); } ?> <div class="row pane"> <div class="col-xs-12"> <h1 class="page-header"><?php print $name; ?> Module</h1> <?php $form = $page->getPlugin('Form', array('module_details', WebApp::action('', '', false), '', '')); $form->setColumns(3, 9)->addTextField('Module ID', 'id', $module_id, array('t' => 'The ID of the module'), array('ro' => true))->addTextField('Installed', 'installed', date(DATET_SHORT, strtotime($installDate)), array('t' => 'The date/time the module was installed'), array('ro' => true))->addTextField('Name', 'name', $name, array('t' => 'The name of the module'), array('ro' => true))->addTextField('Namespace', 'namespace', $namespace, array('t' => 'The namespace of the module'), array('ro' => true))->addTextField('Version', 'version', $version, array('t' => 'The version of the module'), array('ro' => true))->addTextArea('Description', 'desc', $description, 3, array('t' => 'Description of the module'), array('ro' => true))->addTextField('Author', 'author', $author, array('t' => 'The module\'s author'), array('ro' => true))->addTextField('Author\'s Website', 'authorUrl', $authorUrl, array('t' => 'The website of the author'), array('ro' => true))->addTextField('Backup', 'backup', $backup, array('t' => 'Can the module be backed up?'), array('ro' => true))->addTextField('Uninstall', 'uninstall', $uninstall, array('t' => 'Can the module be uninstalled?'), array('ro' => true)); $btns = array(); if ($this->inGroup(1)) { $btns['Uninstall'] = array('s' => B_T_FAIL, 'a' => array('t' => 'url', 'a' => '/action/modules/pre_uninstall?ns=' . $namespace, 'oc' => ''), 'ic' => 'remove'); } if ($this->accessAdminPage(5)) { $btns['Update'] = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '/admin/modules/update/' . $namespace, 'oc' => ''), 'ic' => 'play-circle'); } $form->addBtnLine($btns); $form->build(); print $form->getForm(); ?> </div> </div>