Esempio n. 1
0
function homePage()
{
    $t = new Template('home.html');
    $t->replace('BACKGROUND', $_SESSION['userconf']['general']['background']);
    $t->replace('CSS', 'css.html');
    $t->replace('NAVBAR', 'navbar.html');
    $t->replace('DATA_COUNT', DataC::getCount($_SESSION['userid']));
    $t->replace('FEED_COUNT', FeedC::getCount($_SESSION['userid']));
    $t->replace('RUNNING_COUNT', FeedC::getRunningCount($_SESSION['userid']));
    $t->replace('PLUGIN', PluginC::getHTML());
    $t->replace('FEED_ALL', FeedC::getAllHTML($_SESSION['userid']));
    $t->replace('MODAL_DDROP', 'modal_ddrop.html');
    $t->replace('MODAL_TAG', 'modal_tag.html');
    $t->replace('TAGS_LIST', TagC::getTagsList());
    $t->replace('PLUGINS_LIST', PluginC::getPluginsList());
    $t->replace('MODAL_PREVIEW', 'feed_data_preview.html');
    $t->replace('FOOTER', 'footer.html');
    $t->replace('JAVASCRIPT_LIBS', 'javascript.libs.php');
    $t->replace('JAVASCRIPT_CHRIS', 'javascript.chris.html');
    $t->replace('USERNAME', ucfirst($_SESSION['username']));
    $t->replace('CHRIS_VERSION', CHRIS_VERSION);
    // ui
    $t->replace('CHRIS_UI_CHECKBOX', 'ui_checkbox.html');
    if (CHRIS_MAINTENANCE) {
        $t->replace('MAINTENANCE', 'display:block');
    } else {
        $t->replace('MAINTENANCE', 'display:none');
    }
    return $t;
}
Esempio n. 2
0
 public static function getHTML($object)
 {
     $t = new Template('plugin.html');
     $t->replace('PLUGIN_CAROUSEL', PluginV::getCarousel($object));
     $plugin_parameters = '';
     foreach ($object as $p) {
         $plugin_parameters .= PluginC::getUI($p['name']);
     }
     $t->replace('PLUGIN_PARAMETERS', $plugin_parameters);
     return $t;
 }
Esempio n. 3
0
 $password = $_SESSION['password'];
 $feedname = sanitize($_POST['FEED_NAME']);
 if (isset($_POST['FEED_STATUS'])) {
     // status, if we don't want to start with status=0
     $status = sanitize($_POST['FEED_STATUS']);
 } else {
     $status = 0;
 }
 if (isset($_POST['FEED_MEMORY'])) {
     // memory, if we don't want to start with memory=256
     $memory = sanitize($_POST['FEED_MEMORY']);
 } else {
     $memory = 2048;
 }
 // plugin name?
 $command = PluginC::getExecutable(sanitize($_POST['FEED_PLUGIN']));
 // parameters?
 $parentFolder = null;
 if (is_array($v0)) {
     foreach ($v0 as $key => $value) {
         if ($value['type'] == 'dropzone' && $value['value'] != '') {
             $value['value'] = joinPaths(CHRIS_USERS, $value['value']);
             if (!$parentFolder) {
                 // no parent folder set yet, so let's grab this value
                 if (is_dir($value['value'])) {
                     // this is already the directory
                     $parentFolder = $value['value'];
                 } else {
                     $parentFolder = dirname($value['value']);
                 }
             }
 public static function getPluginsList()
 {
     $htmlContent = '';
     $plugins = PluginC::discover();
     // loop through the names
     foreach ($plugins as $p) {
         //$htmlContent .= '<option value="'.$p['name'].'">'.$p['name'].'</option>';
         $htmlContent .= '<option value="' . $p['name'] . '" data-backgroundcolor="lightgrey" >' . $p['name'] . '</option>';
     }
     return $htmlContent;
 }