function displayOptForm($groupName, $groupOptions) { global $options, $formErrors; foreach ($groupOptions as $opt) { if (!empty($opt[4])) { echo ' <div class="control-group ' . (isset($formErrors[$groupName][$opt[0]]) ? "error" : "") . '" > <label class="control-label" for="' . h8($groupName . "_" . $opt[0]) . '">' . h8($opt[0]) . '</label> <div class="controls"> '; switch ($opt[4]) { case "yesno": echo "<input type=radio name='" . h8($groupName . "_" . $opt[0]) . "' value='yes' " . ($options[$groupName][$opt[0]] === "yes" ? "checked" : "") . " /> Yes "; echo "<input type=radio name='" . h8($groupName . "_" . $opt[0]) . "' value='no' " . ($options[$groupName][$opt[0]] === "no" ? "checked" : "") . " /> No "; break; case "text": echo "<input type=text name='" . h8($groupName . "_" . $opt[0]) . "' value='" . h8($options[$groupName][$opt[0]]) . "' />"; break; case "textarea": echo "<textarea name='" . h8($groupName . "_" . $opt[0]) . "' >" . h8($options[$groupName][$opt[0]]) . "</textarea>"; break; } echo '<p class="help-block">' . $opt[2] . '</p>'; echo "\n </div>\n </div>\n "; } } }
function render($ranks, $target, $keywords) { $height = 450; $idDiveu = rand(1000, 3000); echo '<div id="' . $idDiveu . '" style="height: ' . $height . 'px; margin: 0 auto"></div>'; echo "\n<script type='text/javascript'>\n\nvar chart;\n\$(document).ready(function() {\n chart = new Highcharts.Chart({\n exporting: {\n url: 'http://export.highcharts.com/',\n \n buttons: {\n printButton:{\n enabled:false\n }\n }\n },\n chart: {\n renderTo: '{$idDiveu}',\n defaultSeriesType: 'line',\n zoomType: 'x',\n },\n\n\n title: {\n text: '',\n },\n yAxis: {\n min : -10,\n max : 100,\n endOnTick: false,\n tickPixelInterval: 40, \n reversed : true,\n title: {\n text: 'Position'\n },\n subtitle: {\n text: document.ontouchstart === undefined ?\n 'Click and drag in the plot area to zoom in' :\n 'Drag your finger over the plot to zoom in'\n },\n },\n\n legend: {\n align: 'center',\n verticalAlign: 'bottom',\n borderWidth: 0\n },\n\n series: [\n"; foreach ($keywords as $keyword) { echo "{\n"; echo "\tname: " . json_encode_tag($keyword) . ",\n"; echo "\tdata: ["; foreach ($ranks as $rank) { if (isset($rank[$target]) && isset($rank[$target][$keyword])) { echo "{y:" . $rank[$target][$keyword][0] . ",name:'" . date('d M', strtotime($rank['date'])) . "<br/>" . h8($rank[$target][$keyword][1]) . "'},"; } else { echo "null,"; } } echo "]\n"; echo "},\n"; } echo "{\n"; echo "\tlineWidth: 0,\n"; echo "\tcolor: 'black',\n"; echo "\tmarker: {symbol: 'square'},\n"; echo "\tname: \"Events\",\n"; echo "\tdata: ["; foreach ($ranks as $check) { $hEvent = false; $event = date('d M', strtotime($check['date'])) . "<br/>"; if (isset($check['__event']) && isset($check['__event'][$target]) && is_array($check['__event'][$target])) { foreach ($check['__event'][$target] as $evt) { $hEvent = true; $event .= "<b>" . h8($target) . "</b>:<br/>" . $evt . "<br/>"; } } if ($hEvent) { echo "{y: -2, name:'" . addcslashes($event, "'") . "'},"; } else { echo "null,"; } } echo "]\n"; echo "},\n"; echo "\n ],\n \n xAxis: {\n categories: [\n"; foreach ($ranks as $rank) { echo "'" . date('d M', strtotime($rank['date'])) . "',"; } echo "\n ],\n }\n });\n });\n</script>\n"; }
<td><input type="text" name="port" class=input-mini placeholder="port" /></td> <td><input type="text" name="user" placeholder="username" /></td> <td><input type="text" name="password" placeholder="password" /></td> <td><p><input type="submit" class="btn btn-primary" value="Add" /></p></td> </tr> </table> <hr/> <h4>Bulk import</h4> <select name=bulkimport-type class="input-mini"> <option>http</option> <option>socks</option> <option>iface</option> </select> <textarea name=bulkimport-proxies style="width:100%; height: 120px" placeholder="ip#port#username#password" ></textarea> <input type=submit class="btn btn-primary" value="Bulk Import" /> </form> <hr/> <h4>Lists URL</h4> <form method=POST> <p class="help-block">If you use public proxies list,you need to <a href='http://serposcope.serphacker.com/doc/proxies.html' >optimize the configuration</a>.</p> <textarea name=list-url-proxies style="width:100%; height: 120px" placeholder="http://domain.com/proxies-list.html" ><?php echo h8($options['general']['proxies_list_url']); ?> </textarea> <input type=submit class="btn btn-primary" value="Update proxies list URL" /> </form> <?php include 'inc/footer.php';
return; } setCookie("serposcope", JSON.stringify(cookie), 365); document.location.reload(true); }); }); </script> <?php foreach ($sites as $idSite => $site) { echo "<a class=linkdiv id='" . h8($site) . "' href='' ></a>"; echo "<div>\n"; echo "<div class='row group-head' >" . "<div id='event-bar-{$idSite}' data-id='{$idSite}' class='group-title' >" . h8($site) . "</div>" . "<div class='group-action-btn' >" . "<span data-id='{$idSite}' class='btn group-btn-info' > info </span> " . "<span data-id='{$idSite}' class='btn group-btn-calendar' > calendar </span> " . "</div>" . "</div>"; ?> <div id="event-table-<?php echo $idSite; ?> " class="table-event-container" > <form id="event-form-<?php echo $idSite; ?> " class="form-event" action="ajax.php" > <input type="hidden" name="action" value="addEvent" /> <input type="hidden" name="target" value="<?php echo $idSite; ?> " />
} ?> <div> <form method="POST" class="well form-horizontal" action="import.php" enctype="multipart/form-data" > <fieldset> <div class="control-group"> <label class="control-label" for="group">Group</label> <div class="controls"> <select name="group" > <?php $groups = array(); $qImportGroup = "SELECT idGroup,name FROM `" . SQL_PREFIX . "group` ORDER BY idGroup DESC"; // recent first $resImportGroup = $db->query($qImportGroup); while ($resImportGroup && ($group = mysql_fetch_assoc($resImportGroup))) { echo "<option value=" . $group['idGroup'] . " >" . h8($group['name']) . "</option>"; } ?> </select> <div class="help-block" > <span class="label label-warning">Warning</span> It's highly recommanded to use import on new and empty group. </div> </div> </div> <div class="control-group"> <label class="control-label" for="type">Source type</label> <div class="controls"> <select name="type" > <option value="<?php
<label class="control-label" for="sites">Domain</label> <div class="controls sites"> <textarea type="text" name="sites" class="input-xlarge" placeholder="www.site.com or *.site.com" ><?php echo !empty($sites) ? h8(implode("\n", $sites)) : ""; ?> </textarea> </div> </div> <div id="groupopt" > <?php foreach ($modules[$group['module']]->getGroupOptions() as $option) { echo '<div class="control-group">'; echo '<label class="control-label" for="' . $option[0] . '">' . $option[0] . '</label>'; echo '<div class="controls">'; echo '<input type="text" class="input-xlarge" id="' . $option[0] . '" name="' . $option[0] . '" value="' . h8(isset($group['options']->{$option}[0]) ? $group['options']->{$option}[0] : $option[1]) . '" >'; if ($option[2] != "") { echo '<p class="help-block">' . $option[2] . '</p>'; } echo '</div>'; echo '</div>'; echo "\n"; } ?> </div> <div class='control-group' > <div class="controls"> <button class="btn btn-primary" type="submit" name="edit" value="edit" >Edit</button> </div>
function displayRanks($ranks) { echo "<table class='rankchange-table table' >\n"; echo "\n <thead>\n <tr>\n <th data-sort='string' style='width:50%;' >keyword</th>\n <th data-sort='string' style='width:50%;' >domain</th>\n <th data-sort='change' style='width:50px;' >Old</th>\n <th data-sort='change' style='width:50px;' >Now</th>\n <th data-sort='change' style='width:50px;' >+/-</th>\n <th style='width:50px;' >Group</th>\n </tr>\n </thead>\n <tbody>\n "; foreach ($ranks as $key => $rank) { $split = explode("-", $key); array_shift($split); echo "<tr><td>" . h8(implode($split, "-")) . "</td>"; echo "<td>" . h8($rank['url']) . "</td>"; echo "<td>" . (isset($rank['prev']) ? $rank['prev'] : "N/A") . "</td>"; echo "<td>" . (isset($rank['now']) ? $rank['now'] : "N/A") . "</td>"; echo "<td>"; if ($rank['diff'] == 0) { echo "<span>="; } else { if ($rank['diff'] > 0) { echo "<span style='color:green' >" . ($rank['diff'] == 1000 ? "IN" : "+" . $rank['diff']); } else { echo "<span style='color:red' >" . ($rank['diff'] == -1000 ? "OUT" : $rank['diff']); } } echo "</span></td>"; echo "<td>[<a href='view.php?idGroup=" . h8($rank['group']) . "#" . h8($rank['url']) . "' >view</a>]</td>"; echo "</tr>\n"; } echo "</tbody></table>\n"; }
</div> </div> </div> </div> </div> <div class="container" id="bodycontainer" > <div class="row"> <div class="span3"> <ul class="nav nav-list"> <li class="nav-header">Groups</li> <?php $pos = 0; foreach ($groups as $headerGroup) { ++$pos; $liclass = ""; $iclass = ""; if (isset($_GET['idGroup']) && $_GET['idGroup'] == $headerGroup['idGroup']) { $liclass .= " active"; } $istyle = 'background-image:url(modules/' . $headerGroup['module'] . '/icon.png);'; echo ' <li class="draggable-li ' . $liclass . '" ondrop="drop(event)" ondragover="allowDrop(event)" > <a data-id="' . $headerGroup['idGroup'] . '" id="group-link-' . $headerGroup['idGroup'] . '" href="view.php?idGroup=' . $headerGroup['idGroup'] . '" draggable="true" ondragstart="drag(event)" > <i class="handleicon"></i><i class="groupicon" style="' . $istyle . '" ></i> ' . h8($headerGroup['name']) . "\n </a>\n </li>\n"; } ?> </ul> </div> <div class="span9" id="page-body" >
<?php function h8() { $arr = array(0, 1, 2, 3, 4); end($arr); next($arr); $arr2 = $arr; var_dump(current($arr2)); var_dump(current($arr)); } h8();
<div class="control-group"> <label class="control-label" for="keywords">Keywords</label> <div class="controls keywords"> <textarea type="text" name="keywords" class="input-xlarge" placeholder="one keyword per line" ><?php echo isset($_POST['keywords']) && !empty($_POST['keywords']) ? h8(implode("\n", $_POST['keywords'])) : ""; ?> </textarea> </div> </div> <div class="control-group"> <label class="control-label" for="sites">Domain</label> <div class="controls sites"> <textarea type="text" name="sites" class="input-xlarge" placeholder="www.site.com or *.site.com" ><?php echo isset($_POST['sites']) && !empty($_POST['sites']) ? h8(implode("\n", $_POST['sites'])) : ""; ?> </textarea> </div> </div> <div class="control-group"> <label class="control-label" for="module">Module</label> <div class="controls"> <?php foreach ($modules as $name => $module) { echo "<input type='radio' name='module' value='{$name}' class=itype >" . " <img src='modules/{$name}/icon.png' /> {$name} <i></i>" . "<br/>"; } ?> </div> </div>
function render($ranks, $target, $keywords) { $hashKeywords = array(); $hashMonths = array(); $hashYears = array(); foreach ($ranks as $id => $check) { $day = date('d', strtotime($check['date'])); $month = date('m', strtotime($check['date'])); $year = date('Y', strtotime($check['date'])); if (isset($hashMonths[$month])) { ++$hashMonths[$month]; } else { $hashMonths[$month] = 1; } if (isset($hashYears[$year])) { ++$hashYears[$year]; } else { $hashYears[$year] = 1; } } $nYear = count($hashYears); echo "<table class='table table-bordered table-condensed tablerender' >"; echo "<tr><td></td>"; foreach ($hashYears as $year => $nDay) { echo "<td colspan={$nDay} >{$year}</td>"; } echo "</tr>"; echo "<tr><td></td>"; foreach ($hashMonths as $month => $nDay) { echo "<td colspan={$nDay} >{$month}</td>"; } echo "</tr>"; echo "<tr><td></td>"; foreach ($ranks as $id => $check) { $day = date('d', strtotime($check['date'])); $hEvent = false; $event = date('d M Y', strtotime($check['date'])) . "<br/>"; $tdclass = "tdsame"; if (isset($check['__event']) && isset($check['__event'][$target]) && is_array($check['__event'][$target])) { $tdclass = "tdevent"; foreach ($check['__event'][$target] as $evt) { $hEvent = true; $event .= "<b>" . h8($target) . "</b>:<br/>" . h8($evt) . "<br/>"; } } echo "<td class='{$tdclass}' data-toggle='tooltip' title='" . h8($event) . "' >{$day}</td>"; } echo "</tr>"; foreach ($keywords as $keyword) { echo "<tr><td>" . h8($keyword) . "</td>"; $prev = ""; foreach ($ranks as $id => $check) { $tooltip = "="; $tdclass = "tdsame"; $now = ""; if (isset($check[$target][$keyword])) { $now = $check[$target][$keyword][0]; } if ($prev === "" && $now !== "" || $prev > $now) { if ($prev === "" && $now !== "") { $tooltip = "+" . (100 - $now); } else { $tooltip = "+" . ($prev - $now); } $tdclass = "tdprogess"; } else { if ($prev < $now) { $tdclass = "tdregress"; $tooltip = "-" . ($now - $prev); } } echo "<td class='{$tdclass}' data-toggle='tooltip' title='{$tooltip}' >"; echo $now; echo "</td>"; $prev = $now; } echo "</tr>"; } echo "</table>"; // echo count($hashYears)." ".count($hashMonths)." ".count($ranks); }
<?php if (!defined('INCLUDE_OK')) { die; } if (!isset($_POST['host']) || !isset($_POST['login']) || !isset($_POST['password']) || !isset($_POST['database']) || !isset($_POST['prefix'])) { header('Location: ?step=1', true, 302); die; } $cfgToWrite = '<?php define(\'SQL_HOST\',\'' . addcslashes($_POST['host'], "'") . '\'); define(\'SQL_LOGIN\',\'' . addcslashes($_POST['login'], "'") . '\'); define(\'SQL_PASS\',\'' . addcslashes($_POST['password'], "'") . '\'); define(\'SQL_DATABASE\',\'' . addcslashes($_POST['database'], "'") . '\'); define(\'SQL_PREFIX\',\'' . addcslashes($_POST['prefix'], "'") . '\'); ?>'; if (file_put_contents($incdir . "config.php", $cfgToWrite) === FALSE) { echo "Can't write to <code>" . $incdir . "config.php</code> . Create the file with the following content : <br/><br/>\n <pre>" . h8($cfgToWrite) . "</pre>\n "; } else { // everything OK echo "\n <div class='alert alert-success' >\n Installation done <br/>\n <a href='../' >Go ninja go</a><br/><br/>\n </div> \n"; }
<input id="database" name="database" value="<?php echo isset($_POST['database']) ? h8($_POST['database']) : ""; ?> " /> </div> </div> <div class="control-group"> <label class="control-label" for="prefix">Prefix</label> <div class="controls"> <input id="prefix" name="prefix" value="<?php echo isset($_POST['prefix']) ? h8($_POST['prefix']) : ""; ?> " /> </div> </div> <?php echo "<div style='text-align: center; margin-top: 20px;' >"; echo "<input type=submit class='btn btn-primary' value='Next' />"; echo "</div>"; } else { if ($nextStep == 3) { echo "\n <form method='post' class='form-horizontal' action='?step={$nextStep}' >\n <input type=hidden name=host value='" . (isset($_POST['host']) ? h8($_POST['host']) : "") . "' />\n <input type=hidden name=login value='" . (isset($_POST['login']) ? h8($_POST['login']) : "") . "' />\n <input type=hidden name=password value='" . (isset($_POST['password']) ? h8($_POST['password']) : "") . "' />\n <input type=hidden name=database value='" . (isset($_POST['database']) ? h8($_POST['database']) : "") . "' />\n <input type=hidden name=prefix value='" . h8($prefix) . "' /> \n <div style='text-align: center; margin-top: 20px;' >\n <input type=submit class='btn btn-primary' value='Next' />\n </div>\n </form>\n "; } } ?> </form>
* * Redistributions of files must retain the above notice. */ if (!file_exists('inc/config.php')) { header("Location: install/", TRUE, 302); die; } require 'inc/config.php'; include 'inc/define.php'; include 'inc/common.php'; include "inc/header.php"; ?> <h2>Websites</h2> <div> <table class='table' > <thead> <tr><th>hostname</th><th>group</th><th>actions</th></tr> </thead> <tbody> <?php $q = "SELECT `" . SQL_PREFIX . "target`.name tname,idTarget, " . "`" . SQL_PREFIX . "group`.idGroup,`" . SQL_PREFIX . "group`.name gname " . "FROM `" . SQL_PREFIX . "target` " . "JOIN `" . SQL_PREFIX . "group` USING(idGroup) "; $result = $db->query($q); while ($result && ($row = mysql_fetch_assoc($result))) { echo "<tr>" . "<td>" . h8($row['tname']) . "</td>" . "<td>" . h8($row['gname']) . "</td>" . "<td> <a class='btn' href='view.php?idGroup=" . $row['idGroup'] . "#" . h8($row['tname']) . "' >view</a> " . " <a class='btn group-btn-info' data-id='" . $row['idTarget'] . "' >info</a> " . " <a class='btn' >calendar</a></td>" . "</tr>"; } ?> </tbody> </table> </div> <?php include 'inc/footer.php';