function index() { $this->title = "Tagging"; $this->message = "BeBuntu Tags"; pass_var('title', $this->title); pass_var('message', $this->message); }
function edit() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } $r = new Mon_realm(); $r = $r->find_all(); $rids = array(); foreach ($r as $realm) { $rids[$realm->id] = $realm->tested_realm; } if ($_POST["action"] == "updatemoncred") { global $runtime; $data = $_POST; unset($data["action"]); unset($data["updatemonrealm"]); $m = new Mon_cred(); $m = $m->find_one_by_id($runtime['ident']); $m->data = $data; $m->dirty = array('username', 'password', 'mon_realmid'); $m->save(); $m = $m->find_one_by_id($runtime['ident']); pass_var("monc", $m->data); } else { global $runtime; $m = new Mon_cred(); $m = $m->find_one_by_id($runtime['ident']); pass_var("monc", $m->data); } pass_var("rids", $rids); pass_var('title', "Edit Monitor Realm"); pass_var('message', "Edit Monitor Realm"); }
function add() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } if ($_POST["action"] == "addservice") { $data = $_POST; unset($data["action"]); unset($data["addservice"]); $data["ts"] = date("c"); // Let's store directly ISO 860 timestamps $s = new Service_loc($data); $s->save(); } $i = new Institution(); $i = $i->find_all(); $insts = array(); foreach ($i as $inst) { $insts[$inst->id] = $inst->org_name; } pass_var('ins', $insts); pass_var('title', "Add Realm"); pass_var('message', "Add Realm"); }
function logout() { $this->user = new Session(); $this->user->destroy(); $this->message = "Good buy!"; pass_var('message', $this->message); redirect(''); }
function all() { $this->is_loggedin(); $this->title = "List of all administrators."; $this->message = "All Administrators"; $admins = new Admin(); pass_var('title', $this->title); pass_var('all_admins', $admins->find_all()); pass_var('message', $this->message); }
function all() { $this->is_loggedin(); $this->title = "Countries"; $this->message = "BeBuntu Countries"; $all_countries = new Country(); pass_var('all_countries', $all_countries->find_all()); pass_var('title', $this->title); pass_var('message', $this->message); }
function add() { $this->is_loggedin(); $this->title = "Add Questions"; $this->message = "Add a new question"; if ($_POST['action'] == 'newquestion') { if ($this->newquestion($_POST)) { $this->message = "Question added"; } else { $this->message = "There was an error"; } } pass_var('title', $this->title); pass_var('message', $this->message); }
function add() { $this->is_loggedin(); $this->title = "Add new teams"; $this->message = "Add a new team"; if ($_POST['action'] == 'newteam') { if ($this->newteam($_POST)) { $this->message = "Team added."; } } $all_countries = new Country(); pass_var('countries', $all_countries->find_all()); pass_var('title', $this->title); pass_var('message', $this->message); }
function add() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } if ($_POST["action"] == "addrealm") { $data = $_POST; unset($data["action"]); unset($data["addrealm"]); $data["ts"] = date("c"); // Let's store directly ISO 860 timestamps $r = new Realm($data); $r->save(); } pass_var('title', "Add Realm"); pass_var('message', "Add Realm"); }
function edit() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } if ($_POST["action"] == "updatemonlog") { global $runtime; $data = $_POST; unset($data["action"]); unset($data["updatemonlog"]); $m = new Mon_log(); $m = $m->find_one_by_id($runtime['ident']); $m->data = $data; $m->dirty = array('scheduled', 'ts_scheduled', 'ts_start', 'ts_end', 'type', 'status'); $m->save(); $m = $m->find_one_by_id($runtime['ident']); // Small hacks to get the date usable $m->data['ts_scheduled'] = substr($m->data['ts_scheduled'], 0, 16); $m->data['ts_start'] = substr($m->data['ts_start'], 0, 16); $m->data['ts_end'] = substr($m->data['ts_end'], 0, 16); pass_var("monl", $m->data); } else { global $runtime; $m = new Mon_log(); $m = $m->find_one_by_id($runtime['ident']); // Small hacks to get the date usable $m->data['ts_scheduled'] = substr($m->data['ts_scheduled'], 0, 16); $m->data['ts_start'] = substr($m->data['ts_start'], 0, 16); $m->data['ts_end'] = substr($m->data['ts_end'], 0, 16); pass_var("monl", $m->data); } pass_var('title', "Edit Monitoring Log"); pass_var('message', "Edit Monitoring Log"); }
function edit() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } $r = new Mon_realm(); $r = $r->find_all(); $ml = new Mon_log(); $ml = $ml->find_all(); $rids = array(); foreach ($r as $realm) { $rids[$realm->id] = $realm->tested_realm; } $mls = array(); foreach ($ml as $m) { $mls[$m->id] = $m->ts_scheduled; } if ($_POST["action"] == "updatemonser") { global $runtime; $data = $_POST; unset($data["action"]); unset($data["updatemonser"]); $data["ts"] = date("c"); // Let's store directly ISO 860 timestamps $m = new Mon_ser(); $m = $m->find_one_by_id($runtime['ident']); $m->data = $data; $m->dirty = array('name', 'mon_realmid', 'ip', 'port', 'timeout', 'retry', 'secret', 'stype', 'reject_only', 'radsec', 'monitoring', 'last_mon_logid', 'ts'); $m->save(); $m = $m->find_one_by_id($runtime['ident']); pass_var("mons", $m->data); } else { global $runtime; $m = new Mon_ser(); $m = $m->find_one_by_id($runtime['ident']); pass_var("mons", $m->data); } pass_var("rids", $rids); pass_var("mls", $mls); pass_var('title', "Edit monitored server"); pass_var('message', "Edit monitored server"); }
function edit() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } $r = new Mon_realm(); $r = $r->find_all(); $ml = new Mon_log(); $ml = $ml->find_all(); $ms = new Mon_ser(); $ms = $ms->find_all(); $rids = array(); foreach ($r as $realm) { $rids[$realm->id] = $realm->tested_realm; } $mls = array(); foreach ($ml as $m) { $mls[$m->id] = $m->ts_scheduled; } $mons = array(); foreach ($ms as $mon) { $mons[$mon->id] = $mon->name; } if ($_POST["action"] == "updatemonrealmlog") { global $runtime; $data = $_POST; unset($data["action"]); unset($data["updatemonrealmlog"]); $data["ts"] = date("c"); // Let's store directly ISO 860 timestamps $m = new Mon_realm_log(); $m = $m->find_one_by_id($runtime['ident']); $m->data = $data; $m->dirty = array('mon_realmid', 'mon_type', 'status', 'a_resp_time', 'r_resp_time', 'mon_serid', 'mon_logid', 'ts'); $m->save(); $m = $m->find_one_by_id($runtime['ident']); pass_var("monr", $m->data); } else { global $runtime; $m = new Mon_realm_log(); $m = $m->find_one_by_id($runtime['ident']); pass_var("monr", $m->data); } pass_var("rids", $rids); pass_var("mons", $mons); pass_var("mls", $mls); pass_var('title', "Edit Monitored Realm Log"); pass_var('message', "Edit Monitored Realm Log"); }
function edit() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } $r = new Realm(); $r = $r->find_all(); $rids = array(); foreach ($r as $realm) { $rids[$realm->id] = $realm->org_name; } if ($_POST["action"] == "updaterealmusage") { global $runtime; $data = $_POST; unset($data["action"]); unset($data["updaterealmusage"]); $data["date"] = date("Y-m-d"); $r = new Realm_usage(); $r = $r->find_one_by_id($runtime['ident']); $r->data = $data; $r->dirty = array('realmid', 'national_sn', 'international_sn', 'date'); $r->save(); $r = $r->find_one_by_id($runtime['ident']); pass_var("realmd", $r->data); } else { global $runtime; $r = new Realm_usage(); $r = $r->find_one_by_id($runtime['ident']); pass_var("realmd", $r->data); } pass_var("rids", $rids); pass_var('title', "Edit Realm Usage"); pass_var('message', "Edit Realm Usage"); }
function edit() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } $i = new Institution(); $i = $i->find_all(); $insts = array(); foreach ($i as $inst) { $insts[$inst->id] = $inst->org_name; } if ($_POST["action"] == "updateinstusage") { global $runtime; $data = $_POST; unset($data["action"]); unset($data["updateinstusage"]); $data["date"] = date("Y-m-d"); $instu = new Institution_usage(); $instu = $instu->find_one_by_id($runtime['ident']); $instu->data = $data; $instu->dirty = array('institutionid', 'local_sn', 'national_sn', 'international_sn', 'date'); $instu->save(); $instu = $instu->find_one_by_id($runtime['ident']); pass_var("instu", $instu->data); } else { global $runtime; $instu = new Institution_usage(); $instu = $instu->find_one_by_id($runtime['ident']); pass_var("instu", $instu->data); } pass_var("insts", $insts); pass_var('title', "Edit Institution Usage"); pass_var('message', "Edit Institution Usage"); }
function edit() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } global $runtime; $r = new Realm(); $r = $r->find_all(); $rids = array(); foreach ($r as $realm) { $rids[$realm->id] = $realm->org_name; } if (!empty($_POST)) { $_POST["ts"] = date("c"); $i = new Institution(); $i = $i->find_one_by_id($runtime['ident']); $i->data = $_POST; $i->dirty = array('realmid', 'type', 'inst_realm', 'org_name', 'address_street', 'address_city', 'contact_name', 'contact_email', 'contact_phone', 'info_URL', 'policy_URL', 'ts'); $i->save(); } $inst = new Institution(); $inst = $inst->find_one_by_id($runtime['ident']); pass_var("rids", $rids); pass_var("institution", $inst); pass_var("title", "Edit Institution"); pass_var("message", "Edit Institution"); }
pass_var('kpaged', $kpaged + 1); pass_var('step', $step); pass_var('next_step', $step); echo '</form>'; echo '<p>Please, wait... step #' . ($kpaged + 1) . '</p>'; ?> <script type="text/javascript"> function jump() { document.forms["knews_import_process"].submit(); } setTimeout ('jump()', 1000); </script> <?php } else { pass_var('step', 5); pass_var('next_step', 5); if ($step == '5' && $confirmation_sql_count != 0) { $query = "UPDATE " . KNEWS_NEWSLETTERS_SUBMITS . " SET paused=0, users_total=" . $confirmation_sql_count . " WHERE id=" . $submit_confirmation_id; $results = $wpdb->query($query); } //Informe if ($step == '4') { echo '<h3>' . __('Import preview (we have not made any changes yet:', 'knews') . '</h3>'; } else { echo '<h3>' . __('Import results', 'knews') . '</h3>'; } ?> <table border="0" cellpadding="0" cellspacing="0" id="informimport"> <tr class="alt"><td> </td><td><?php _e('CSV total:', 'knews'); ?>
function edit() { // Is logged in? $this->session = new Session(); if (!$this->session->get('email') && !$this->session->get('id')) { die(redirect('')); } $r = new Realm(); $r = $r->find_all(); $rids = array(); foreach ($r as $realm) { $rids[$realm->id] = $realm->org_name; } if ($_POST["action"] == "updaterealmdata") { global $runtime; $data = $_POST; unset($data["action"]); unset($data["updaterealmdata"]); $data["ts"] = date("c"); // Let's store directly ISO 860 timestamps $r = new Realm_data(); $r = $r->find_one_by_id($runtime['ident']); $r->data = $data; $r->dirty = array('realmid', 'number_inst', 'number_user', 'number_id', 'number_IdP', 'number_SP', 'number_SPIdP', 'ts'); $r->save(); $r = $r->find_one_by_id($runtime['ident']); pass_var("realmd", $r->data); } else { global $runtime; $r = new Realm_data(); $r = $r->find_one_by_id($runtime['ident']); pass_var("realmd", $r->data); } pass_var("rids", $rids); pass_var('title', "Edit Realm Data"); pass_var('message', "Edit Realm Data"); }