コード例 #1
0
function peteava($movie)
{
    $seedfile = file_get_contents("http://content.peteava.ro/seed/seed.txt");
    $t1 = explode("=", $seedfile);
    $seed = $t1[1];
    if ($seed == "") {
        return "";
    }
    $r = r();
    $s = hexdec($seed);
    $local3 = crunch($s, $movie);
    $local3 = crunch($local3, "0");
    $local3 = crunch($local3, $r);
    return strtolower(dechex($local3)) . $r;
}
コード例 #2
0
ファイル: Utilities.php プロジェクト: axiixc/elemental
function eoargs($array)
{
    if (is_even(count($array))) {
        $i = 0;
        do {
            $a = $i;
            $b = $i + 1;
            $x[crunch($array[$a])] = $array[$b];
            $i = $i + 2;
        } while ($i <= count($array));
        return $x;
    } else {
        exLog('eoargs(): requires an even number array.');
    }
}
コード例 #3
0
ファイル: Resources.php プロジェクト: axiixc/elemental
 public function __construct()
 {
     $args = eoargs(func_get_args());
     $this->read_only = false;
     if (isset($args['clone'])) {
         $_page = new Page($args['clone']);
         if (!is_null($_page->id)) {
             $this->id = $_page->id;
             $this->name = $_page->name;
             $this->content = $_page->content;
             $this->author = $_page->author;
         } else {
             exLog("BlankPage->__construct(): Failed to clone from id {$args['clone']}");
         }
     }
     $this->{$id} = appPagesGenerateKey();
     $this->name = $args['name'];
     $this->ref_name = crunch($args['name'], true);
     $this->content = $args['content'];
     if (is_string($args['author']) and strlen($args['author'] == 32)) {
         $args['author'] = new User($args['author']);
     }
     if (is_object($args['author']) and isset($args['author']->id)) {
         $this->author = $args['author'];
     }
     $this->date_modified = $this->date_created = date(sdfDay);
     $this->draft = priority_select($args['draft'], false);
     // Is this needed?
     $draft = $this->draft ? '1' : '0';
     query(SharedPage::$statements['create'], $this->id, $this->name, $this->ref_name, $this->content, $this->author->id, $this->date_modified, $this->date_created, $draft);
     $__this = query(SharedPage::$statements['is_page'], $this->id);
     if (is_resource($__this) and mysql_num_rows($__this) > 0) {
         $_this = mysql_fetch_assoc($__this);
         $this->ref_id = $_this['ref_id'];
     }
 }
コード例 #4
0
ファイル: Configuration.php プロジェクト: axiixc/elemental
 public function set($key)
 {
     crunch($key);
     return array_key_exists($key, $this->cache);
 }
コード例 #5
0
ファイル: Application.php プロジェクト: axiixc/elemental
<?php

# Preferences Application
if (isset($_GET['arg'])) {
    $_GET['arg'] = 'system';
}
crunch($_GET['arg'], null);
foreach (fsGetPreferences() as $p_item) {
    include $p_item . 'Info.php';
    $path_parts = pathinfo($p_item);
    $link_name = $path_parts['basename'];
    $preferences[] = array('name' => priority_select($preferences['name'], $link_name), 'link' => parseLink("ex://Preferences/{$link_name}"));
}
コード例 #6
0
ファイル: Authority.php プロジェクト: axiixc/elemental
 public function configurationDelete($key)
 {
     crunch($key);
     if ($this->set($key)) {
         unset($this->session_configuration[$key]);
     }
 }
コード例 #7
0
ファイル: Core.php プロジェクト: axiixc/elemental
# System Execution Point [axiixc]
if (!isset($index)) {
    die('<b style="color:red">ERROR</b>');
}
define('root', $index);
include root . 'Resources/Configuration/System.php';
define('www', $web_path);
define('invalid', false);
// For exMethod()
define('exMethod', true);
$required_libraries = array('Dictionary', 'Utilities', 'Filesystem', 'Development', 'Database', 'Configuration', 'System', 'Interface', 'Authority', 'User');
foreach ($required_libraries as $library) {
    require_once root . "Resources/Library/{$library}.php";
}
crunch($_GET['app']);
System::Initialize();
$app_list = fsGetApplications();
$app_path = $app_list[System::Application()];
if (file_exists($app_path . 'Application.php')) {
    if (file_exists($app_path . 'Initialize.php')) {
        include $app_path . 'Initialize.php';
    }
    if (System::Authority()->verified) {
        if (file_exists($app_path . 'Info.php')) {
            include $app_path . 'Info.php';
            if (!is_null($application['name'])) {
                setTitle($application['name']);
            }
        }
        if (file_exists($app_path . 'Resources.php')) {
コード例 #8
0
ファイル: Development.php プロジェクト: axiixc/elemental
 public static function debugActivate($name)
 {
     crunch($name);
     self::$activate[] = $name;
 }
コード例 #9
0
ファイル: Interface.php プロジェクト: axiixc/elemental
 public function menu($input, $pre = null, $item = null, $post = null, $pre2 = null)
 {
     if ($input == 0 and is_string($input)) {
         crunch($input);
         $result = query();
         if (is_resource($result)) {
             if (mysql_num_rows($result) == 1) {
                 $menu = mysql_fetch_assoc($result);
             } else {
                 exLog("Interface->menu({$input} 'string'): No menu found");
             }
         } else {
             exLog("Interface->menu({$input} 'string'): Result was not mysql value");
         }
     } else {
         if (is_array($input)) {
             $navigation = $input;
         } else {
             $result = query();
             if (is_resource($result)) {
                 if (mysql_num_rows($result) == 1) {
                     $menu = mysql_fetch_assoc($result);
                 } else {
                     exLog("Interface->menu({$input} 'string'): No menu found");
                 }
             } else {
                 exLog("Interface->menu({$input} 'string'): Result was not mysql value");
             }
         }
     }
     if (!isset($navigation)) {
         $result = query();
         while ($row = mysql_fetch_assoc($result)) {
             $navigation[] = $row;
         }
     }
     if ($pre == 'return formated') {
         unset($pre);
         $pre = $pre2;
         $return = true;
     } else {
         if ($pre == 'return unformatted') {
             return $navigation;
         }
     }
     if (is_null($pre)) {
         $pre = $this->template('Menu Pre');
     }
     if (is_null($item)) {
         $item = $this->template('Menu Item');
     }
     if (is_null($post)) {
         $item = $this->template('Menu Post');
     }
     $output = $pre;
     foreach ($navigation as $item) {
         if ($item['name'] == '[SESSION_PORTAL]' and $item['link'] == '[SESSION_PORTAL]') {
             if (System::Authority()->verified) {
                 $link['name'] = 'Logout';
                 $link['link'] = 'ex://Users/Logout';
             } else {
                 $link['name'] = 'Login';
                 $link['link'] = 'ex://Users/Login';
             }
         }
         if ($item['link'] == '[HOME]') {
             $item['link'] = cfRead('Home Link');
         }
         if (is_null($item['link'])) {
             $item['link'] = 'javascript:;';
         }
         $link = $this->parseLink($item['link']);
         $current = $this->isCurrentPage($link) ? ' class="current" ' : null;
         $output .= sprintf($item, $link, $link['name'], $current);
     }
     $output .= $post;
     if ($return === true) {
         return $output;
     } else {
         echo $output;
     }
 }
コード例 #10
0
ファイル: System.php プロジェクト: axiixc/elemental
 public static function Set($name)
 {
     crunch($name);
     return isset(self::$environment[$name]);
 }