Beispiel #1
5
 function do_dl_csv($f3, $args)
 {
     if (!rStaff::_isLogin()) {
         return parent::_return(8001);
     }
     $rows = $this->_db->exec("SELECT * FROM `" . self::fmTbl() . "` ORDER BY insert_ts DESC ");
     if (!$rows) {
         header("Content-Type:text/html; charset=utf-8");
         echo '無結果';
     } else {
         $template = new Template();
         f3()->set('rows', $rows);
         Outfit::_setXls("contact_" . date("YmdHis"));
         echo $template->render('contact.dl.html', "application/vnd.ms-excel");
     }
 }
 public function __construct($options = array())
 {
     if (isset($options['defaults'])) {
         $this->defaults = array_merge($this->defaults, $options['defaults']);
     }
     $this->looktype = $this->defaults['looktype'];
     $this->addons = $this->defaults['addons'];
     $this->movement = $this->defaults['movement'];
     $this->direction = $this->defaults['direction'];
     $this->mount = $this->defaults['mount'];
     $this->head = $this->defaults['head'];
     $this->body = $this->defaults['body'];
     $this->legs = $this->defaults['legs'];
     $this->feet = $this->defaults['feet'];
     if (isset($options['queries'])) {
         $this->queries = array_merge($this->queries, $options['queries']);
     }
     if (isset($options['query']) && $options['query'] == true) {
         $this->queriefy();
     }
     if (isset($options['hexmount']) && $options['hexmount'] == true) {
         $this->hexmount = true;
     }
     $verboseColors = array('black' => '000000', 'white' => 'FFFFFF', 'gray' => '777777', 'red' => 'FF0000', 'redlight' => 'FF4444', 'reddark' => '880000', 'firebrick' => 'B22222', 'brown' => 'A52A2A', 'sienna' => 'A0522D', 'green' => '00FF00', 'greenlight' => '44FF44', 'greendark' => '008800', 'greenyellow' => 'ADFF2F', 'yellow' => 'FFFF00', 'cyan' => '00FFFF', 'blue' => '0000FF', 'bluelight' => '4444FF', 'bluedark' => '000088', 'royalblue' => '4169E1', 'skyblue' => '87CEEB', 'magenta' => 'FF00FF', 'purple' => 'A020F0', 'pink' => 'EE799F', 'pinklight' => 'FFC0CB', 'pinkdark' => '8B475D', 'salmon' => 'FA8072', 'seashell' => 'FFF5EE', 'flat-turquoise' => '1abc9c', 'flat-greensea' => '16a085', 'flat-emerald' => '2ecc71', 'flat-nephritis' => '27ae60', 'flat-peterriver' => '3498db', 'flat-belizehole' => '2980b9', 'flat-amethyst' => '9b59b6', 'flat-wisteria' => '8e44ad', 'flat-wetasphalt' => '34495e', 'flat-midnightblue' => '2c3e50', 'flat-sunflower' => 'f1c40f', 'flat-orange' => 'f39c12', 'flat-carrot' => 'e67e22', 'flat-pumpkin' => 'd35400', 'flat-alizarin' => 'e74c3c', 'flat-pomegranate' => 'c0392b', 'flat-clouds' => 'ecf0f1', 'flat-silver' => 'bdc3c7', 'flat-concrete' => '95a5a6', 'flat-asbestos' => '7f8c8d');
     self::$colors = array_merge(self::$colors, $verboseColors);
     return $this;
 }
 public static function destroy()
 {
     $params = $_POST;
     $outfit_to_remove = $params['outfit_id'];
     $user_id = $_SESSION['user'];
     Outfit::destroy_outfit($outfit_to_remove);
     Redirect::to('/outfits/', array('message' => 'Outfit removed from system!'));
 }
Beispiel #4
0
 function do_preview($f3, $args)
 {
     rStaff::_chkLogin();
     $cu = fPress::get_row('/' . $args['slug'], 'slug', '', true);
     if (empty($cu)) {
         f3()->error(404);
     }
     f3()->set('cu', $cu);
     parent::wrapper('press/content.html', $cu['title'], '/press' . $cu['slug']);
 }
Beispiel #5
0
<?php

include 'Outfit.class.php';
header('Content-type: image/png');
$outfit = new Outfit(array('query' => true, 'hexmount' => true, 'queries' => array('looktype' => 'a', 'addons' => 'b', 'head' => 'c', 'body' => 'd', 'legs' => 'e', 'feet' => 'f', 'mount' => 'g', 'direction' => 'h', 'movement' => 'i')));
$outfit->render();
Beispiel #6
0
 function do_comingsoon($f3, $args)
 {
     parent::wrapper('comingsoon.html', 'Coming Soon', '/');
 }
 public static function destroy_outfit($outfit_id)
 {
     Outfit::destroy_from_db($outfit_id);
 }
Beispiel #8
0
 function do_contact($f3, $args)
 {
     $f3->set('act_link', 'contact');
     parent::wrapper('contact.html', 'Contact me', '/contact');
 }