/** * simple_set_toggle * * @param mixed $feature * @access public * @return void */ function simple_set_toggle($feature) { global $prefs; $tikilib = TikiLib::lib('tiki'); $logslib = TikiLib::lib('logs'); if (isset($_REQUEST[$feature]) && $_REQUEST[$feature] == 'on') { if (!isset($prefs[$feature]) || $prefs[$feature] != 'y') { // not yet set at all or not set to y if ($tikilib->set_preference($feature, 'y')) { add_feedback($feature, tr('%0 enabled', $feature), 1, 1); $logslib->add_action('feature', $feature, 'system', 'enabled'); } } } else { if (!isset($prefs[$feature]) || $prefs[$feature] != 'n') { // not yet set at all or not set to n if ($tikilib->set_preference($feature, 'n')) { add_feedback($feature, tr('%0 disabled', $feature), 0, 1); $logslib->add_action('feature', $feature, 'system', 'disabled'); } } } $cachelib = TikiLib::lib('cache'); $cachelib->invalidate('allperms'); }
/** * simple_set_toggle * * @param mixed $feature * @access public * @return void */ function simple_set_toggle($feature) { global $_REQUEST, $tikilib, $prefs, $logslib; if (isset($_REQUEST[$feature]) && $_REQUEST[$feature] == 'on') { if (!isset($prefs[$feature]) || $prefs[$feature] != 'y') { // not yet set at all or not set to y if ($tikilib->set_preference($feature, 'y')) { add_feedback($feature, tr('%0 enabled', $feature), 1, 1); $logslib->add_action('feature', $feature, 'system', 'enabled'); } } } else { if (!isset($prefs[$feature]) || $prefs[$feature] != 'n') { // not yet set at all or not set to n if ($tikilib->set_preference($feature, 'n')) { add_feedback($feature, tr('%0 disabled', $feature), 0, 1); $logslib->add_action('feature', $feature, 'system', 'disabled'); } } } global $cachelib; require_once 'lib/cache/cachelib.php'; $cachelib->invalidate('allperms'); }
$pref_toggles = array('feature_wiki_1like_redirection'); foreach ($pref_toggles as $toggle) { simple_set_toggle($toggle); } $pref_byref_values = array('server_timezone'); foreach ($pref_byref_values as $britem) { byref_set_value($britem); } $tikilib->set_preference('display_timezone', $tikilib->get_preference('server_timezone')); // Special handling for tied fields: tikiIndex, urlIndex and useUrlIndex } $smarty->assign('now', $tikilib->now); if (!empty($_REQUEST['testMail'])) { include_once 'lib/webmail/tikimaillib.php'; $mail = new TikiMail(); $mail->setSubject(tra('Tiki Email Test')); $mail->setText(tra('Tiki Test email from:') . ' ' . $_SERVER['SERVER_NAME']); if (!$mail->send(array($_REQUEST['testMail']))) { $msg = tra('Unable to send mail'); if ($tiki_p_admin == 'y') { $mailerrors = print_r($mail->errors, true); $msg .= $mailerrors; } $smarty->assign('error_msg', $msg); } else { add_feedback('testMail', tra('Test mail sent to') . ' ' . $_REQUEST['testMail'], 3); } } $engine_type = getCurrentEngine(); $smarty->assign('db_engine_type', $engine_type); ask_ticket('admin-inc-general');
<?php session_start(); include 'main.php'; include '../model/database.php'; include '../model/product_db.php'; $tenKH = ""; $feedback = ""; $vote = ""; $uploaddir = '../images/thanhvien/'; $uploadfile = $uploaddir . basename($_FILES['file']['name']); move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile); $image = $_FILES['file']['name']; if (isset($_POST['tenKH'])) { $tenKH = $_POST['tenKH']; } if (isset($_POST['feedback'])) { $feedback = $_POST['feedback']; } if (isset($_POST['vote'])) { $vote = $_POST['vote']; } if ($_POST['txtCaptcha'] != $_SESSION['security_code']) { header("Location: ../index.php?msg=del"); } else { $feed = add_feedback($tenKH, $feedback, $image, $vote); header("Location: ../index.php?msg=ok"); }
/** * simple_set_int * * @param mixed $feature * @access public * @return void */ function simple_set_int($feature) { global $prefs; $logslib = TikiLib::lib('logs'); $tikilib = TikiLib::lib('tiki'); $smarty = TikiLib::lib('smarty'); if (isset($_REQUEST[$feature]) && is_numeric($_REQUEST[$feature])) { $old = $prefs[$feature]; if ($old != $_REQUEST[$feature]) { $tikilib->set_preference($feature, $_REQUEST[$feature]); add_feedback($feature, tr('%0 set', $feature), 2); $logslib->add_action('feature', $feature, 'system', $old . '=>' . $_REQUEST['feature']); } } }
/** * simple_set_int * * @param mixed $feature * @access public * @return void */ function simple_set_int($feature) { global $_REQUEST, $tikilib, $prefs, $logslib; if (isset($_REQUEST[$feature]) && is_numeric($_REQUEST[$feature])) { $old = $prefs[$feature]; if ($old != $_REQUEST[$feature]) { $tikilib->set_preference($feature, $_REQUEST[$feature]); add_feedback($feature, tr('%0 set', $feature), 2); $logslib->add_action('feature', $feature, 'system', $old . '=>' . $_REQUEST['feature']); } } }
<script src="js/jquery.js"></script> <script src="../js/bootstrap-datepicker.js"></script> <script type="text/javascript"> $(window).load(function(){ $('#automodal').modal('show'); }); $(window).load(function(){ $('#pesan').collapse('show'); }); </script> </head> <body> <?php echo add_feedback(); ?> <div id="wrapper"> <!-- Navigation --> <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <a class="navbar-brand" href="index.php" id="nav-pandan">KATAR 06</a> </div> <!-- Top Menu Items --> <ul class="nav navbar-right top-nav"> <li class="dropdown"> <a href="" class="dropdown-toggle" data-toggle="dropdown"><?php echo chat_pesan_counter();