# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. */ $_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true); Functions::check_required_parameters(array($_GET['param1'])); //Get recipe $result = MySQLQueries::get_recipe($_GET['param1']); $recipe = MySQLConnection::fetch_object($result); $recipe = Functions::format_dates($recipe); $interpreters = array("shell", "bash", "perl", "python", "node.js"); Header::set_title("Commando.io - Edit Recipe"); Header::render(array("chosen", "codemirror")); Navigation::render("recipes"); ?> <div class="container"> <div class="row"> <div class="span12"> <h1 class="header" style="float: left;"><?php echo $recipe->name; ?> </h1> <div style="float: right;"> <a href="<?php echo Links::render("view-recipe", array($recipe->id)); ?>
while ($row = MySQLConnection::fetch_object($result)) { if (isset($servers[$row->group_name])) { array_push($servers[$row->group_name], $row); } else { $servers[$row->group_name] = array($row); } } //Get groups $groups = array(); $result = MySQLQueries::get_groups(); while ($row = MySQLConnection::fetch_object($result)) { $groups[] = $row; } Header::set_title("Commando.io - Servers"); Header::render(array("chosen", "code-pretty", "tagsinput")); Navigation::render("servers"); ?> <!-- add server modal --> <div class="modal fade" id="add-server" style="display: none;"> <div class="modal-header"> <a class="close" data-dismiss="modal">×</a> <h3>Add Server</h3> </div> <div class="modal-body"> <form id="form-add-server" class="well form-horizontal" method="post" action="/actions/add_server.php"> <div class="control-group"> <label class="control-label" for="add-server-label">Server Label</label> <div class="controls"> <input type="text" class="input-large" id="add-server-label" name="label" placeholder="SERVER-NAME" maxlength="30" /> <p class="help-block">A human readable label. Must be unique.</p> </div>
//Get execution history record $execution_history = null; MongoConnection::connect(); MongoConnection::select_collection("executions"); $results = MongoConnection::find(array("_id" => new MongoId($_GET['param1']))); MongoConnection::close(); foreach ($results as $result) { $result['executed'] = date(DATE_FORMAT, $result['executed']->sec + Functions::timezone_offset_in_seconds()); $execution_history = $result; } if (empty($execution_history)) { Error::halt(404, 'not found', 'Execution history ID \'' . $_GET['param1'] . '\' does not exist.'); } Header::set_title("Commando.io - View Execution History"); Header::render(array("code-pretty")); Navigation::render("execute"); ?> <div class="container main-container"> <div class="row"> <div class="span12"> <h1 class="header" style="float: left;"><?php echo $execution_history['executed']; ?> </h1> <div style="float: right;"> <a href="<?php echo Links::render("execution-history"); ?>
# limitations under the License. */ $_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true); //Get settings $settings = null; $result = MySQLQueries::get_settings(); $row = MySQLConnection::fetch_object($result); if (isset($row->data)) { $row->data = json_decode($row->data); } $settings = $row; $settings = Functions::format_dates($settings); $interpreters = array("shell", "bash", "perl", "python", "node.js"); Header::set_title("Commando.io - Settings"); Header::render(array("chosen", "code-pretty")); Navigation::render("settings"); ?> <div class="container"> <h1 class="header">Settings</h1> <div class="row"> <div class="span12"> <div class="well"> <?php if (isset($_GET['param1']) && $_GET['param1'] == "saved") { ?> <div class="alert alert-success" id="settings-saved-alert"> <strong>Settings saved successfully.</strong>
# you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. */ $_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true); $db_version = Functions::get_db_version(); Header::set_title("Commando.io"); Header::render(); Navigation::render(); ?> <?php if ($db_version !== Version::db) { ?> <div class="alert alert-error fade in" style="position: fixed; top: 0px; right: 0px; left: 0px; z-index: 99999;"> <a class="close" data-dismiss="alert">×</a> <h4 style="line-height: 25px;">Warning! The MySQL schema version running is <u>out of date</u>. Please run <a href="<?php echo Links::render("db-upgrade"); ?> ">db-upgrade</a> to merge in the latest changes.</h4> </div> <?php } ?>
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. */ $_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true); Header::set_title("Commando.io - Files"); Header::render(); Navigation::render("files"); ?> <div class="container"> <h1 class="header">Files</h1> <div class="row"> <div class="span12"> <div id="upload-box-container" class="well"> <div id="upload-box"> <div class="progress progress-striped active" style="display: none; margin-bottom: 10px;"> <div class="bar" style="width: 0%;"></div> </div> <h3>Drag a file here to upload…</h3> <h5>Maximum file size is 20MB.</h5>
unset($s); // Analyze section $s = new Section('Analyze', '/analyze'); $s->addLink('Keywords', '/analyze/keywords.php'); $s->addLink('Text Ads', '/analyze/text_ads.php'); $s->addLink('Referers', '/analyze/referers.php'); $s->addLink('IPs', '/analyze/ips.php'); $s->addLink('Landing Pages', '/analyze/landing_pages.php'); $nav->addSection($s); unset($s); // Visitors section $s = new Section('Visitors', '/visitors/'); $s->addLink('Visitor History', '/visitors/'); $nav->addSection($s); unset($s); // Spy section $s = new Section('Spy', '/spy/'); $s->addLink('Spy View', '/spy/'); $nav->addSection($s); unset($s); $s = new Section('Update', '/update'); $s->addLink('Update Subids', '/update/subids.php'); $s->addLink('Update CPC', '/update/cpc.php'); $s->addLink('Reset Campaign Subids', '/update/clear-subids.php'); $s->addLink('Delete Subids', '/update/delete-subids.php'); $s->addLink('Upload Revenue Reports', '/update/upload.php'); $nav->addSection($s); unset($s); $nav->setCurrentURI($_SERVER['REQUEST_URI']); echo $nav->render();
function admin_header() { header('Content-Type: text/html; charset=' . (getConfig('rss.output.encoding') ? getConfig('rss.output.encoding') : DEFAULT_OUTPUT_ENCODING)); echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"; echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n"; echo "<head>"; $header = new Header(admin_title(), LOCATION_ADMIN, null, '', HDR_NONE | HDR_NO_CACHECONTROL | HDR_NO_OUPUTBUFFERING); $header->render(); echo "</head>"; echo "<body>\n"; echo "" . "<div id=\"nav\" class=\"frame\">" . "<h1 id=\"top\">" . rss_main_title() . "</h1>"; $nav = new Navigation(); $nav->render(); echo "</div>"; }
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. */ $_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true); //Get groups $groups = array(); $result = MySQLQueries::get_groups(); while ($row = MySQLConnection::fetch_object($result)) { $groups[] = $row; } Header::set_title("Commando.io - Groups"); Header::render(); Navigation::render("groups"); ?> <!-- add group modal --> <div class="modal fade" id="add-group" style="display: none;"> <div class="modal-header"> <a class="close" data-dismiss="modal">×</a> <h3>Add Group</h3> </div> <div class="modal-body"> <form id="form-add-group" class="well form-horizontal" method="post" action="/actions/add_group.php"> <div class="control-group"> <label class="control-label" for="add-group-name">Group Name</label> <div class="controls"> <input type="text" class="input-large" id="add-group-name" name="name" placeholder="GROUP NAME" maxlength="25" /> <p class="help-block">The group name. Must be unique.</p> </div>
function rss_nav() { $nav = new Navigation(); $nav->render(); }