/** * serialize and unserialize */ require_once './appCommon.php'; if (!isset($_GET['type']) || !isset($_GET['num']) || !isset($_GET['action'])) { exit('Fail'); } if (!isset($_GET['charset'])) { $cs = 'UTF-8'; } else { $cs = $_GET['charset']; } $type = $_GET['type']; $num = $_GET['num']; $key = $_POST['data']; $memm = new MEMMANAGER(); $curcon = $memm->GetConFromSession($type, $num); $memm->LoadMem(); if (!$memm->is_login()) { exit("NoLogin"); } if (!$memm->MemConnect($type, $curcon)) { exit("ConnectFail"); } $thekey = str_replace("_ _rd", "'", $key[0]['key']); $thekey = str_replace("_ _rx", "\\", $thekey); if ($_GET['action'] == 'ser') { $list = $memm->MemGet(array($thekey)); if (is_array($list[0][$thekey])) { arrayRecursive($list[0][$thekey], 'htmlspecialchars', true, $cs); echo serialize($list[0][$thekey]);
<?php if (!ini_get('session.auto_start')) { session_start(); } error_reporting(0); define('IN_MADM', TRUE); require_once "../langs/" . $_SESSION["MADM_SESSION_KEY"]['lang'] . ".php"; require_once '../config.php'; global $config; require_once '../include/class/memmanager.class.php'; require_once "../include/func/memadmin.func.php"; $memm = new MEMMANAGER(); if (!$memm->is_login()) { exit("NoLogin"); } $monitorlist = getSessionMonitor(); $type = $monitorlist[0]['type']; $num = $monitorlist[0]['num']; $conid = $monitorlist[0]['conid']; $curcon = $memm->GetConFromSession($monitorlist[0]['type'], $monitorlist[0]['num']); $memm->LoadMem(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Show_Hit</title> <script type="text/javascript" src="../include/js/jquery-1.6.1.min.js"></script> <script type="text/javascript" src="../include/js/jquery.anyDrag.min.js"></script> <script type="text/javascript" src="../include/js/jquery.timers-1.2.js"></script>
<?php if (!ini_get('session.auto_start')) { session_start(); } define('IN_MADM', true); error_reporting(0); require_once '../include/class/memmanager.class.php'; $memm = new MEMMANAGER(); if (!$memm->is_login()) { exit("NoLogin"); } if (!isset($_GET['type']) || !isset($_GET['num']) || $_GET['type'] != 'con' && $_GET['type'] != 'conp') { exit; } if (isset($_GET['action']) && $_GET['action'] == 'showcon') { $type = $_GET['type']; $num = $_GET['num']; require_once 'show_con.php'; } if (isset($_GET['action']) && $_GET['action'] == 'constatus') { $type = $_GET['type']; $num = $_GET['num']; if (isset($_GET['conid'])) { $conid = $_GET['conid']; } require_once 'con_status.php'; } if (isset($_GET['action']) && $_GET['action'] == 'consettings') { $type = $_GET['type']; $num = $_GET['num'];
<?php /** * count command */ require_once './appCommon.php'; if (!isset($_GET['type']) || !isset($_GET['num']) || !isset($_GET['action']) || !isset($_POST['data'])) { exit('Fail'); } $type = $_GET['type']; $num = $_GET['num']; $data = $_POST['data']; $memm = new MEMMANAGER(); $curcon = $memm->GetConFromSession($type, $num); $memm->LoadMem(); if (!$memm->is_login()) { exit("NoLogin"); } if (!$memm->MemConnect($type, $curcon)) { exit("ConnectFail"); } if ($_GET['action'] == 'incr') { $ret = @$memm->MemIncr($data[0]['key'], $data[0]['value']); if (gettype($ret) == 'boolean' && $ret == false) { echo "IncrFail"; } else { echo $ret; } } else { if ($_GET['action'] == 'decr') { $ret = @$memm->MemDecr($data[0]['key'], $data[0]['value']);
<?php if (!ini_get('session.auto_start')) { session_start(); } error_reporting(0); define('IN_MADM', TRUE); require_once "../langs/" . $_SESSION["MADM_SESSION_KEY"]['lang'] . ".php"; require_once '../config.php'; global $config; require_once '../include/class/memmanager.class.php'; require_once "../include/func/memadmin.func.php"; $memm = new MEMMANAGER(); if (!$memm->is_login()) { exit("NoLogin"); } $monitorlist = getSessionMonitor(); $curcon = $memm->GetConFromSession($monitorlist[0]['type'], $monitorlist[0]['num']); $memm->LoadMem(); $init_slabid = NULL; $md5_op = NULL; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Show_Monitor</title> <script type="text/javascript" src="../include/js/jquery-1.6.1.min.js"></script> <script type="text/javascript" src="../include/js/jquery.anyDrag.min.js"></script> <script type="text/javascript" src="../include/js/jquery.timers-1.2.js"></script> <script type="text/javascript" src="../include/js/show_monitor_data.js"></script>
<?php /** * return the monitor data */ require_once './appCommon.php'; $type = $_SESSION['MADM_SESSION_KEY']['monitor'][0]['type']; $num = $_SESSION['MADM_SESSION_KEY']['monitor'][0]['num']; $memm = new MEMMANAGER(); $curcon = $memm->GetConFromSession($type, $num); $memm->LoadMem(); if (!$memm->is_login()) { exit("NoLogin"); } if (!isset($_SESSION) || !array_key_exists('MADM_SESSION_KEY', $_SESSION) || !array_key_exists('monitor', $_SESSION['MADM_SESSION_KEY'])) { exit("SessionFail"); } else { if ($_SESSION['MADM_SESSION_KEY']['monitor'][0]['monitor'] == 'stats') { if ($type == 'con') { if (!$memm->MemConnect($type, $curcon)) { exit("ConnectFail"); } else { $list = $memm->GetStats($curcon['host'], $curcon['port']); if ($list == false) { exit("GetStatsFail"); } $rlist = array(); foreach ($_SESSION['MADM_SESSION_KEY']['monitor'][1] as $key => $value) { if (!array_key_exists($value, $list)) { exit("GetKeyFail"); }
$valuefilter = str_replace("_ _rd", "'", $filters[0]['vf']); } $test_str = "test"; if ($filters[0]['kt'] == 1) { $r = @preg_match($keyfilter, $test_str); if (gettype($r) == 'boolean' && $r == false) { exit("KeyFilterFail"); } } if ($filters[0]['vt'] == 1) { $r = @preg_match($valuefilter, $test_str); if (gettype($r) == 'boolean' && $r == false) { exit("ValueFilterFail"); } } $memm = new MEMMANAGER(); $curcon = $memm->GetConFromSession($type, $num); $memm->LoadMem(); if (!$memm->is_login()) { exit("NoLogin"); } if (!$memm->MemConnect($type, $curcon)) { exit("ConnectFail"); } if ($type == 'con') { $list = $memm->MemCacheDump($slabid, $shownum); $slist = $memm->GetStats($curcon['host'], $curcon['port']); $lid = $curcon['host'] . ":" . $curcon['port']; $list = $list[$lid]; $relist = array(); $relist['res'] = array();
<?php /** * delete an item */ require_once './appCommon.php'; if (!isset($_GET['type']) || !isset($_GET['num'])) { exit('Fail'); } $type = $_GET['type']; $num = $_GET['num']; $key = $_POST['data']; $memm = new MEMMANAGER(); $curcon = $memm->GetConFromSession($type, $num); $memm->LoadMem(); if (!$memm->is_login()) { exit("NoLogin"); } if (!$memm->MemConnect($type, $curcon)) { exit("ConnectFail"); } $thekey = str_replace("_ _rd", "'", $key[0]['key']); $thekey = str_replace("_ _rx", "\\", $thekey); if (@$memm->MemDel($thekey)) { echo "DelOK"; } else { echo "DelFail"; }
<?php /** * set command */ require_once './appCommon.php'; if (!isset($_GET['type']) || !isset($_GET['num']) || !isset($_POST['data'])) { exit('Fail'); } $type = $_GET['type']; $num = $_GET['num']; $data = $_POST['data']; $memm = new MEMMANAGER(); $curcon = $memm->GetConFromSession($type, $num); $memm->LoadMem(); if (!$memm->is_login()) { exit("NoLogin"); } if (!$memm->MemConnect($type, $curcon)) { exit("ConnectFail"); } $thekey = str_replace("_ _rd", "'", $data[0]['key']); $thekey = str_replace("_ _rx", "\\", $thekey); $thevalue = str_replace("_ _rd", "'", $data[0]['value']); $thevalue = str_replace("_ _rx", "\\", $thevalue); if ($memm->MemSet($thekey, $thevalue)) { echo "SetOK"; } else { echo "SetFail"; }
<?php /** * flush all */ require_once './appCommon.php'; if (!isset($_GET['type']) || !isset($_GET['num'])) { exit('Fail'); } $type = $_GET['type']; $num = $_GET['num']; $memm = new MEMMANAGER(); $curcon = $memm->GetConFromSession($type, $num); $memm->LoadMem(); if (!$memm->is_login()) { exit("NoLogin"); } if (!$memm->MemConnect($type, $curcon)) { exit("ConnectFail"); } $re = $memm->flushAll(); if ($re == true) { exit("FlushOK"); } else { exit("Fail"); }