require_once basePath . "/inc/menu-functions/shout.php"; require_once basePath . "/inc/menu-functions/teamspeak.php"; require_once basePath . "/inc/menu-functions/kalender.php"; require_once basePath . "/inc/menu-functions/team.php"; ## SETTINGS ## $time_start = generatetime(); lang($language); $dir = "sites"; ## SECTIONS ## if (!isset($_GET['i'])) { $action = ""; } else { $action = $_GET['i']; } switch ($action) { case 'kalender': echo kalender($_GET['month'], $_GET['year']); break; case 'teams': echo team($_GET['tID']); break; case 'server': echo '<table class="hperc" cellspacing="0">' . server($_GET['serverID']) . '</table>'; break; case 'shoutbox': echo '<table class="hperc" cellspacing="1">' . shout(1) . '</table>'; break; case 'teamspeak': echo '<table class="hperc" cellspacing="0">' . teamspeak(1) . '</table>'; break; }
<?php $this->load->view('header'); ?> <div class="container"> <div class="row"><div class="col-sm-12 content"> <div class="row"> <div class="col-sm-9"> <h1>Dashboard</h1> <?php shout(); ?> <div class="alert alert-info"> Selamat datang ke Mahuni.com, cara mudah dan berkesan menggunakan FB Ads! </div> </div> <?php $this->load->view('dashboard_sidebar'); ?> </div> </div></div> </div> <?php $this->load->view('footer');
function rbt_make_inputs_dev($inputs, $default = array(), $settings = array()) { shout(); // echo validation_errors('<div class="alert alert-danger">','</div>'); foreach ($inputs as $name => $input) { $form_error = form_error($name, '<span>', '</span>'); $is_error = $form_error != ''; // if(array_key_exists($name, $default) === FALSE) $default[$name] = ''; $set_value = set_value($name); // dumper($form_error); // prep values $default_value = ''; if (array_key_exists($name, $default)) { $default_value = $default[$name]; } if (array_key_exists('id', $input) == FALSE) { $input['id'] = ''; } if (array_key_exists('class', $input) == FALSE) { $input['class'] = 'form-control'; } if (array_key_exists('label', $input) == FALSE and array_key_exists('display', $input) !== FALSE) { $input['label'] = $input['display']; } if (array_key_exists($name, $default)) { $default_value = $default[$name]; } // if(array_key_exists('button-block', $settings) !== FALSE) $input['class'] = ''; if ($set_value == "" and $default_value != "") { $set_value = $default_value; } // generate attributes for form_input $input['attr']['id'] = $input['id']; $input['attr']['class'] = $input['class']; // if($is_error) $input['attr']['class'] = $input['class'].' ' $attrs = array(); $attribute = ''; foreach ($input['attr'] as $attr_name => $value) { $attrs[] = $attr_name . '="' . $value . '"'; } if (count($attrs) > 0) { $attribute = implode(' ', $attrs); } // generate form function. We are using codeigniter Form helper to generate the html tag for each inputs except for download, datepicker and color $form_function = 'form_' . $input['type']; // generate open and end input paragraph. Put alert if error if ($input['type'] !== 'hidden') { echo '<p class="form-group'; if ($is_error) { echo ' has-error'; } echo '">'; echo '<label class="control-label">'; if ($is_error) { echo $form_error; } else { echo ucwords($input['label']); } echo '</label>'; } // if($is_error) echo '<div class="alert alert-danger">'.$form_error; // show error if exists // generate input based on type if ($input['type'] == 'input' or $input['type'] == 'textarea' or $input['type'] == 'password' or $input['type'] == 'hidden') { // echo $form_function; // echo form_error($name); echo $form_function($name, $set_value, $attribute); } elseif ($input['type'] == 'radio') { foreach ($input['options'] as $value => $show) { echo ': ' . $form_function($name, $value, $set_value) . ' ' . $show; } } elseif ($input['type'] == 'dropdown') { echo $form_function($name, $input['options'], $set_value, $attribute); } elseif ($input['type'] == 'upload') { // echo '<p><label>'.$input['display'].'</label><br/>'.form_error($name, $error_before, $error_after); // if(!$clear_form){ //get file path $exp = explode('|', $input['rules']); foreach ($exp as $ex) { if (strpos($ex, 'path') !== FALSE) { $path = str_replace('upload_path:./', '', $ex); $path = trim($path, '/') . '/' . $default_value; $src = base_url($path); // echo '<img class="upload_default '.$name.'" src="'.$src.'" style="max-height: 80px"/><br/>'; } } // } echo '<input type="file" name="' . $name . '" id="' . $input['id'] . '" class="' . $input['class'] . '"/></p>'; } elseif ($input['type'] == 'datepicker') { } elseif ($input['type'] == 'color') { } // if($is_error) echo '</div>'; // close input paragraph if ($input['type'] !== 'hidden') { echo '</p>'; } } }
include_once $base . '/changeRank.php'; include_once $base . '/shout.php'; // Remember to include other functions if you want to use them! libxml_use_internal_errors(true); // Hide DOMDocument warnings (though your errors should be turned off anyways) $group = 18; // Change this to your group ID $cookieTime = $base . '/Private/cookieTime.txt'; if (!file_exists($cookieTime)) { file_put_contents($cookieTime, 0); } $cookie = $base . '/Private/cookie'; if (time() - file_get_contents($cookieTime) > 86400) { login($cookie, 'username', 'password'); file_put_contents($cookieTime, time()); } $data = getPostData(true); if (!$data || !array_key_exists('Validate', $data) || $data['Validate'] != $postKey) { die('FAILURE: Incorrect/missing validation key.'); } switch ($data['Action']) { case 'setRank': list($ranks, $roles) = getRoleSets($group); echo updateRank($group, $data['Parameter1'], $data['Parameter2'], $cookie, $ranks, $roles, 9, $base . '/Private/gxcsrf.txt'); break; case 'shout': echo shout($cookie, $group, $data['Parameter1']); break; default: die('No action!'); }
switch($reqType) { case 'init': initVars(); checkCookies(); checkBanned(); echo newShouts(true); break; case 'shout': $shoutText = $_POST['shout']; $shoutName = $_POST['name']; // Parse the message if(!processCommand($shoutText)) shout($shoutName, $shoutText); // Allow execution to flow into refresh case 'refresh': $newShouts = newShouts(); if ($newShouts) echo $newShouts; break; } // Initialize the session variables to be used for the rest of this chat session function initVars() { $_SESSION['AdminLoggedIn'] = false; $_SESSION['MostRecentTimestamp'] = 0; $_SESSION['YPath'] = $_POST['yPath']; }
<?php ini_set("memory_limit", "1024M"); if ($argc < 3) { die('DRM Policy ID and signing key required.\\n'); } chdir(__DIR__ . '/../'); require_once __DIR__ . '/../bootstrap.php'; $drmPolicyId = $argv[1]; $signingKey = $argv[2]; shout("Adding signing key [" . $signingKey . "] to drm policy [" . $drmPolicyId . "]", true); $drmDbPolicy = DrmPolicyPeer::retrieveByPK($drmPolicyId); if (is_null($drmDbPolicy)) { throw new kCoreException("DRM Policy Id is invalid"); } $drmDbPolicy->putInCustomData(DrmProfile::CUSTOM_DATA_SIGNING_KEY, $signingKey); $drmDbPolicy->save(); shout("Finished adding signingkey to drm policy", true); //write to log function function shout($str, $newLine = false) { echo "[" . date('H:i:s') . "] " . $str . ($newLine ? "\n" : ""); }
editArticle($_POST); } break; case "update_articles": if (notNull($_POST)) { updateArticles($_POST['order']); } break; case "delete_article": if (notNull($_POST)) { deleteArticle($_POST['id']); } break; case "shout": if (notNull($_POST)) { shout($_POST['message'], $_POST['dest']); } break; case "upshout": updateShoutbox(); break; case "classUpdate": getClassCombo($_POST['id'], $_POST['i'], $_POST['className']); break; case "specUpdate": getSpecCombo($_POST['class'], $_POST['id'], $_POST['i'], $_POST['spec']); break; case "checkLoginAvailability": checkLoginAvailability($_POST['login']); break; case "checkMailAvailability":