function is_oto_all($menu, $link_oto, $userid = '') { check_logged_in($this->session->userdata('userid')); $userid == '' ? $uid = $this->session->userdata('userid') : ($uid = $userid); if ($uid == 'Superuser') { $link_oto; } else { if ($this->is_oto($menu, 'c', $uid) == 'Y' || $this->is_oto($menu, 'e', $uid) == 'Y' || $this->is_oto($menu, 'v', $uid) == 'Y' || $this->is_oto($menu, 'p', $uid) == 'Y' || $this->is_oto($menu, 'd', $uid) == 'Y') { $link_oto; } else { //$this->load->view("admin/no_authorisation"); no_auth(); } } }
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); } $zfm = new zetro_frmBuilder('asset/bin/zetro_master.frm'); $zlb = new zetro_buildlist(); $zlb->config_file('asset/bin/zetro_master.frm'); $path = 'application/views/laporan/transaksi'; calender(); link_css('jquery.coolautosuggest.css', 'asset/css'); link_js('jquery.coolautosuggest.js', 'asset/js'); link_js('lap_kas.js', $path . '/js'); panel_begin('Laporan Kas'); panel_multi('laporankas', 'block', false); if ($all_laporankas != '') { $zfm->AddBarisKosong(true); $zfm->Start_form(true, 'frm1'); $zfm->BuildForm('filterlapkas', true, '60%'); $zfm->BuildFormButton('Process', 'filter', 'button', 2); } else { no_auth(); } panel_multi_end(); panel_end();
function printStep2() { $user_default_config = Minz_Configuration::get('default_user'); ?> <?php $s2 = checkStep2(); if ($s2['all'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.conf.ok'); ?> </p> <?php } elseif (!empty($_POST)) { ?> <p class="alert alert-error"><?php echo _t('install.fix_errors_before'); ?> </p> <?php } ?> <form action="index.php?step=2" method="post"> <legend><?php echo _t('install.conf'); ?> </legend> <div class="form-group"> <label class="group-name" for="old_entries"><?php echo _t('install.delete_articles_after'); ?> </label> <div class="group-controls"> <input type="number" id="old_entries" name="old_entries" required="required" min="1" max="1200" value="<?php echo isset($_SESSION['old_entries']) ? $_SESSION['old_entries'] : $user_default_config->old_entries; ?> " tabindex="2" /> <?php echo _t('gen.date.month'); ?> </div> </div> <div class="form-group"> <label class="group-name" for="default_user"><?php echo _t('install.default_user'); ?> </label> <div class="group-controls"> <input type="text" id="default_user" name="default_user" required="required" size="16" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" value="<?php echo isset($_SESSION['default_user']) ? $_SESSION['default_user'] : ''; ?> " placeholder="<?php echo httpAuthUser() == '' ? 'alice' : httpAuthUser(); ?> " tabindex="3" /> </div> </div> <div class="form-group"> <label class="group-name" for="auth_type"><?php echo _t('install.auth.type'); ?> </label> <div class="group-controls"> <select id="auth_type" name="auth_type" required="required" onchange="auth_type_change(true)" tabindex="4"> <?php function no_auth($auth_type) { return !in_array($auth_type, array('form', 'persona', 'http_auth', 'none')); } $auth_type = isset($_SESSION['auth_type']) ? $_SESSION['auth_type'] : ''; ?> <option value="form"<?php echo $auth_type === 'form' || no_auth($auth_type) ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"'; ?> ><?php echo _t('install.auth.form'); ?> </option> <option value="persona"<?php echo $auth_type === 'persona' ? ' selected="selected"' : ''; ?> ><?php echo _t('install.auth.persona'); ?> </option> <option value="http_auth"<?php echo $auth_type === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?> ><?php echo _t('install.auth.http'); ?> (REMOTE_USER = '******')</option> <option value="none"<?php echo $auth_type === 'none' ? ' selected="selected"' : ''; ?> ><?php echo _t('install.auth.none'); ?> </option> </select> </div> </div> <div class="form-group"> <label class="group-name" for="passwordPlain"><?php echo _t('install.auth.password_form'); ?> </label> <div class="group-controls"> <div class="stick"> <input type="password" id="passwordPlain" name="passwordPlain" pattern=".{7,}" autocomplete="off" <?php echo $auth_type === 'form' ? ' required="required"' : ''; ?> tabindex="5" /> <a class="btn toggle-password" data-toggle="passwordPlain"><?php echo FreshRSS_Themes::icon('key'); ?> </a> </div> <?php echo _i('help'); ?> <?php echo _t('install.auth.password_format'); ?> <noscript><b><?php echo _t('gen.js.should_be_activated'); ?> </b></noscript> </div> </div> <div class="form-group"> <label class="group-name" for="mail_login"><?php echo _t('install.auth.email_persona'); ?> </label> <div class="group-controls"> <input type="email" id="mail_login" name="mail_login" value="<?php echo isset($_SESSION['mail_login']) ? $_SESSION['mail_login'] : ''; ?> " placeholder="*****@*****.**" <?php echo $auth_type === 'persona' ? ' required="required"' : ''; ?> tabindex="6"/> <noscript><b><?php echo _t('gen.js.should_be_activated'); ?> </b></noscript> </div> </div> <script> function show_password() { var button = this; var passwordField = document.getElementById(button.getAttribute('data-toggle')); passwordField.setAttribute('type', 'text'); button.className += ' active'; return false; } function hide_password() { var button = this; var passwordField = document.getElementById(button.getAttribute('data-toggle')); passwordField.setAttribute('type', 'password'); button.className = button.className.replace(/(?:^|\s)active(?!\S)/g , ''); return false; } toggles = document.getElementsByClassName('toggle-password'); for (var i = 0 ; i < toggles.length ; i++) { toggles[i].addEventListener('mousedown', show_password); toggles[i].addEventListener('mouseup', hide_password); } function auth_type_change() { var auth_value = document.getElementById('auth_type').value, password_input = document.getElementById('passwordPlain'), mail_input = document.getElementById('mail_login'); if (auth_value === 'form') { password_input.required = true; mail_input.required = false; } else if (auth_value === 'persona') { password_input.required = false; mail_input.required = true; } else { password_input.required = false; mail_input.required = false; } } auth_type_change(); </script> <div class="form-group form-actions"> <div class="group-controls"> <button type="submit" class="btn btn-important" tabindex="7" ><?php echo _t('gen.action.submit'); ?> </button> <button type="reset" class="btn" tabindex="8" ><?php echo _t('gen.action.cancel'); ?> </button> <?php if ($s2['all'] == 'ok') { ?> <a class="btn btn-important next-step" href="?step=3" tabindex="9" ><?php echo _t('install.action.next_step'); ?> </a> <?php } ?> </div> </div> </form> <?php }