Esempio n. 1
0
function LOAD_MEDIA_RSS($t)
{
    global $root;
    $folder = treat_string($t);
    $arr = search_folder($root . "user/uploads/" . $folder);
    if (!$arr) {
        echo "No files to display";
    } else {
        foreach ($arr as $value) {
            $type = detect_type($value);
            $path = $folder . "/" . $value;
            show_media_rss($type, $path);
        }
    }
}
Esempio n. 2
0
function LOAD_MEDIA($t)
{
    global $root, $show_empty;
    $folder = treat_string($t);
    $arr = search_folder($root . "user/uploads/" . $folder);
    if (!$arr && $show_empty == 0) {
        echo "Could not retrieve files.";
    } else {
        foreach ($arr as $value) {
            $type = detect_type($value);
            $path = $folder . "/" . $value;
            if (!strstr($path, "_thumb")) {
                show_media($type, $path);
            }
        }
    }
}
Esempio n. 3
0
echo $selected_theme;
?>
'})">Add new style</p>
<p class="clear"></p><br />
<?php 
$type = "style";
$file_array = search_folder($theme_path . "styles");
foreach ($file_array as $file) {
    $path = $theme_path . "styles/" . $file;
    echo "<span class=\"list-link\" onclick=\"get_data('get_edit_file',{'path':'{$path}','type':'{$type}','refreshurl':'get_edit_theme','refreshid':'{$selected_theme}'})\">{$file}</span><br />";
}
?>
<p class="margin"></p>
<p class="title">Code to display media</p>
<?php 
$file_array = search_folder($theme_path . "parts/media");
$type = "part";
foreach ($file_array as $file) {
    $path = $theme_path . "parts/media/" . $file;
    switch ($file) {
        case "image.php":
            $file = "Images";
            $help = '<p class="help-ico"></p><div class="help-box">This code is used once for every image loaded by a Core command (as "CORE(ENTRY:MEDIA)").</div><p class="clear"></p>';
            break;
        case "video.php":
            $file = "Video";
            $help = '<p class="help-ico"></p><div class="help-box">This code is used once for every video loaded by a Core command (as "CORE(ENTRY:MEDIA)").</div><p class="clear"></p>';
            break;
        case "sound.php":
            $file = "Sound";
            $help = '<p class="help-ico"></p><div class="help-box">This code is used once for every soundfile loaded by a Core command (as "CORE(ENTRY:MEDIA)").</div><p class="clear"></p>';
Esempio n. 4
0
<p class="btn delete" onclick="delete_data('reset_hits',{'id':<?php 
        echo $entry_id;
        ?>
},'get_edit_entry',{'id':<?php 
        echo $entry_id;
        ?>
})">Reset hits</p>
</fieldset>

<p class="clear"></p>
<p class="margin"></p>

<fieldset>
<legend>Files</legend>
<?php 
        $filearray = search_folder($dirpath);
        $i = 0;
        foreach ($filearray as $f) {
            detect_type($f);
            $type = detect_type($f);
            if ($type == "image") {
                $i++;
                echo "<p class=\"media-thumb img\">\n\t  <img src=\"../functions/phpThumb/phpThumb.php?src={$dirpath}/{$f}&w=100&h=60&zc=1&f=png\" /><br />\n\t  {$f}<br />\n\t  <span class=\"list-link\" onclick=\"delete_data('delete_file',{'path':'{$dirpath}/{$f}'},'get_edit_entry',{'id':{$entry_id}})\">Delete image</span>\n\t  </p>";
            } elseif ($type == "video") {
                $i++;
                echo "<p class=\"media-thumb vid\">\n\t  <img src=\"video.jpg\" /><br />\n\t  {$f}<br />\n\t  <span class=\"list-link\" onclick=\"delete_data('delete_file',{'path':'{$dirpath}/{$f}'},'get_edit_entry',{'id':{$entry_id}})\">Delete video</span>\n\t  </p>";
            } elseif ($type == "sound") {
                $i++;
                echo "<p class=\"media-thumb video\">\n\t  <img src=\"sound.jpg\" /><br />\n\t  {$f}<br />\n\t  <span class=\"list-link\" onclick=\"delete_data('delete_file',{'path':'{$dirpath}/{$f}'},'get_edit_entry',{'id':{$entry_id}})\">Delete sound</span>\n\t  </p>";
            } elseif ($type == "link") {
                $i++;
Esempio n. 5
0
<?php

error_reporting(0);
require "_headr.php";
if ($_SESSION["password"] != $pass || $_SESSION["sessid"] != session_id()) {
    die(logout());
}
debug("Password validated, logged in", 0);
?>
<p class="title-head">Style/Layout</p>
These are the folders that are inside core/themes/. To use another theme, see CONFIGURATION.
<p class="margin"></p>
<fieldset>
<legend>Themes</legend>
<?php 
$th_arr = search_folder($root . "themes");
foreach ($th_arr as $th) {
    $s = "";
    if ($th == $theme) {
        $s = " (Currently used)";
    } else {
        $s = "";
    }
    echo "<p class=\"list-item\">\n\n\t\t\t<b><span class=\"list-link\" onclick=\"get_data('get_edit_theme',{'id':'{$th}'})\">{$th}</span></b>{$s}<br />\n\n\t\t\t</p>\n";
}
?>
</fieldset>
Esempio n. 6
0
<p class="clear"></p>
<p class="margin"></p>


  <fieldset>
<legend>Core</legend>
<input type="text" class="text-input" id="user" value="<?php 
echo $user;
?>
" /><p class="form-title">&mdash;User</p><p class="help-ico"></p><div class="help-box">Whatever username you want to use. This serves no purpose other than to connect your password with a specific name. If you change this, make sure to input your existing or a new password in the field below.</div><p class="clear"></p>
<input type="password" id="pass" class="text-input" /><p class="form-title">&mdash;Pass</p><p class="help-ico"></p><div class="help-box">The password you want to use for logging in.</div><p class="clear"></p>
<p class="margin"></p>
<select id="theme">
<?php 
$thms = search_folder($root . "themes");
echo "<option value=\"{$theme}\">{$theme}</option>";
foreach ($thms as $t) {
    if ($t != $theme) {
        echo "<option value=\"{$t}\">{$t}</option>";
    }
}
?>
</select><p class="form-title">&mdash;Theme</p><p class="help-ico"></p><div class="help-box">This should be the name of the folder you want to use as theme.</div>


<p class="clear"></p>


<p class="margin"></p>
Esempio n. 7
0
?>
 total</legend>
<p class="btn add" onclick="get_data('get_add_entry')">Add new entry</p>
<p class="btn add" onclick="e_update()">Submit rearrange</p>
<p class="btn add" onclick="toggleExtra('hide',this)">Hide extra</p>
<p class="clear"></p>
<p class="margin"></p>
<div id="entries">
<?php 
while ($e = @mysql_fetch_array($contents)) {
    $entry_id = $e["entry_id"];
    $entry_title = $e["entry_title"];
    $entry_position = $e["entry_position"] + 1;
    $entry_hits = $e["hits"];
    $p = $root . "user/uploads/" . treat_string($entry_title);
    $files = search_folder($p);
    $images = $video = $sound = $other = 0;
    $layout = "";
    if ($files) {
        foreach ($files as $f) {
            $type = detect_type($f);
            if ($type == "image") {
                $images++;
            } elseif ($type == "video") {
                $video++;
            } elseif ($type == "sound") {
                $sound++;
            } elseif ($type == "layout") {
                if (filesize($p . "/layout.php") > 0) {
                    $layout = "custom layout";
                }