コード例 #1
0
ファイル: index.php プロジェクト: vojtajina/sitellite
    echo '<h1>Not Installed</h1>';
    echo '<p>Error: Unable to retrieve tool list.</p>';
    return;
}
loader_import('saf.XML.Sloppy');
$sloppy = new SloppyDOM();
$doc = $sloppy->parse($data);
if (!$doc) {
    echo '<p>Error: ' . $sloppy->error . '</p>';
    return;
}
ob_start();
echo '<h1>' . intl_get('Not Installed') . '</h1>';
echo '<p align="center"><table border="0" cellpadding="10" cellspacing="1" width="100%">';
loader_import('saf.Misc.Alt');
$alt = new Alt('#fff', '#eee');
$count = 0;
$shown = false;
foreach ($doc->_apps->children as $child) {
    $item = $child->makeObj();
    if (@is_dir(site_docroot() . '/inc/app/' . $item->id)) {
        continue;
    }
    $shown = true;
    $count++;
    if ($count == 1) {
        echo '<tr style="background-color: ' . $alt->next() . '">';
    }
    if (empty($item->icon)) {
        $item->icon = site_prefix() . '/inc/app/cms/pix/default_icon.gif';
    }
コード例 #2
0
<?php

if (!defined("__DIR__")) {
    define('__DIR__', dirname(__FILE__));
}
define('ALT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
error_reporting(E_ALL ^ E_NOTICE);
require ALT_PATH . 'engine' . DIRECTORY_SEPARATOR . 'Alt.php';
spl_autoload_register(array('Alt', 'autoload'));
Alt::start();
コード例 #3
0
ファイル: _log.php プロジェクト: vojtajina/sitellite
		<td align="right">{if pager.total}{spt PAGER_TEMPLATE_PREV_PAGE_LIST_NEXT}{end if}</td>
	</tr>
</table>' . NEWLINEx2);
// header
echo '<table border="0" cellpadding="3" cellspacing="1" width="100%">
		<tr>' . NEWLINE;
foreach ($headers as $header) {
    echo TABx3 . '<th><a href="' . site_prefix() . '/index/usradm-browse-action?list=log&orderBy=' . $header->name . '&sort=' . $header->getSort() . '&offset=' . urlencode($cgi->offset) . '&_type=' . urlencode($cgi->_type) . '&_user='******'&_range=' . urlencode($cgi->_range) . '">' . $header->fullname . '</a>';
    if ($header->isCurrent()) {
        echo ' <img src="' . site_prefix() . '/inc/app/usradm/pix/arrow.' . $cgi->sort . '.gif" alt="' . $cgi->sort . '" border="0" />';
    }
    echo '</th>' . NEWLINE;
}
echo TABx2 . '</tr>' . NEWLINE;
loader_import('saf.Misc.Alt');
$alt = new Alt('#fff', '#eee');
// each row
foreach ($res as $row) {
    $uname = db_shift('select concat(lastname, ", ", firstname) from sitellite_user where username = ?', $row->user);
    if (!$uname) {
        $uname = '<span title="' . intl_get('Non-Existent') . '">' . $row->user . '</span>';
    } elseif ($uname == ', ') {
        $uname = '<a href="' . site_prefix() . '/index/cms-user-view-action?user='******'">' . $row->user . '</a>';
    } else {
        $uname = '<a href="' . site_prefix() . '/index/cms-user-view-action?user='******'" title="' . $uname . '">' . $row->user . '</a>';
    }
    if (strlen($row->message) > 45) {
        $msg = '<span title="' . htmlentities($row->message) . '">' . substr($row->message, 0, 42) . '...</span>';
    } else {
        $msg = $row->message;
    }
コード例 #4
0
ファイル: _prefs.php プロジェクト: vojtajina/sitellite
	// -->
	</script>
	<?php 
echo template_simple('<p><a href="{site/prefix}/index/usradm-add-pref-action?_list={cgi/list}">{intl Add Preference}</a></p>');
$snm =& session_get_manager();
$list = $snm->pref->getList();
$total = count($list);
echo '<p>' . $total . ' ' . intl_get('Preferences found') . ':</p>' . NEWLINEx2;
// header
echo '<table border="0" cellpadding="3" cellspacing="1" width="100%">
		<tr>
			<th>&nbsp;</th>' . NEWLINE;
echo TABx3 . '<th>' . intl_get('Name') . '</th>' . NEWLINE;
echo TABx3 . '<th>' . intl_get('Instructions') . '</th>' . NEWLINE;
echo TABx2 . '</tr>' . NEWLINE;
loader_import('saf.Misc.Alt');
$alt = new Alt('#fff', '#eee');
// each row
foreach ($list as $key => $row) {
    if (!is_array($row)) {
        $row = array('name' => $row);
    } else {
        $row['name'] = $key;
    }
    echo template_simple(TAB . '<tr style="background-color: ' . $alt->next() . '">' . NEWLINE . TABx2 . '<td align="center" width="5%"><a href="{site/prefix}/index/usradm-delete-action?_list={cgi/list}&_key={name}" onclick="return confirmDelete (\'{cgi/list}\', \'{name}\')"><img src="{site/prefix}/inc/app/cms/pix/icons/delete.gif" alt="{intl Delete}" title="{intl Delete}" border="0" /></a></td>', $row);
    echo template_simple(TABx2 . '<td><a href="{site/prefix}/index/usradm-edit-pref-action?_list={cgi/list}&_key={name}">{alt}</a></td>' . NEWLINE, $row);
    echo TABx2 . '<td>' . $row['instructions'] . '</td>' . NEWLINE;
    echo TAB . '</tr>' . NEWLINE;
}
echo '</table>' . NEWLINEx2;
コード例 #5
0
 /**
  * Execute the current query on the given Alt_Database.
  *
  * @param   mixed    $db  Alt_Database instance or name of instance
  * @param   string   result object classname, TRUE for stdClass or FALSE for array
  * @param   array    result object constructor arguments
  * @return  object   Alt_Database_Result for SELECT queries
  * @return  mixed    the insert id for INSERT queries
  * @return  integer  number of affected rows for all other queries
  */
 public function execute($db = NULL, $as_object = NULL, $object_params = NULL)
 {
     if (!is_object($db)) {
         // Get the Alt_Database instance
         $db = Alt_Database::instance($db);
     }
     if ($as_object === NULL) {
         $as_object = $this->_as_object;
     }
     if ($object_params === NULL) {
         $object_params = $this->_object_params;
     }
     // Compile the SQL query
     $sql = $this->compile($db);
     if ($this->_lifetime !== NULL and $this->_type === Alt_Database::SELECT) {
         // Set the cache key based on the Alt_Database instance name and SQL
         $cache_key = 'Alt_Database::query("' . $db . '", "' . $sql . '")';
         // Read the cache first to delete a possible hit with lifetime <= 0
         if (($result = Alt::cache($cache_key, NULL, $this->_lifetime)) !== NULL and !$this->_force_execute) {
             // Return a cached result
             return new Alt_Database_Result_Cached($result, $sql, $as_object, $object_params);
         }
     }
     // Execute the query
     $result = $db->query($this->_type, $sql, $as_object, $object_params);
     if (isset($cache_key) and $this->_lifetime > 0) {
         // Cache the result array
         Alt::cache($cache_key, $result->as_array(), $this->_lifetime);
     }
     return $result;
 }
コード例 #6
0
<?php

defined('ALT_PATH') or die('No direct access allowed.');
Alt::$output = Alt::OUTPUT_HTML;
var_dump($_FILES);
return '<h1>Hello World!</h1>';