Пример #1
0
function switcher_controllink($html)
{
    global $personalities, $_zp_gallery_page;
    $personality = getOption('themeSwitcher_garland_personality');
    if (!$personality) {
        $personality = getOption('garland_personality');
    }
    ?>
	<span id="themeSwitcher_garland">
		<span title="<?php 
    echo gettext("Garland image display handling.");
    ?>
">
			<?php 
    echo gettext('Personality');
    ?>
			<select name="themePersonality" id="themePersonality" onchange="switchPersonality();">
				<?php 
    generateListFromArray(array($personality), $personalities, false, true);
    ?>
			</select>
		</span>
	</span>
	<?php 
    return $html;
}
Пример #2
0
 function handleOption($option, $currentValue)
 {
     $themecolors = array('red', 'white', 'blue', 'none');
     if ($option == 'demoTheme_colors') {
         echo '<select id="demoTheme_themeselect_colors" name="' . $option . '"' . ">\n";
         generateListFromArray(array($currentValue), $themecolors, false, false);
         echo "</select>\n";
     }
 }
Пример #3
0
 function handleOption($option, $currentValue)
 {
     global $themecolors;
     if ($option == 'Theme_colors') {
         echo '<select id="EF_themeselect_colors" name="' . $option . '"' . ">\n";
         generateListFromArray(array($currentValue), $themecolors, false, false);
         echo "</select>\n";
     }
 }
Пример #4
0
 function handleOption($option, $currentValue)
 {
     switch ($option) {
         case 'simplicity3_header_scroll':
             echo '<select id="themeselect" name="' . $option . '"' . ">\n";
             generateListFromArray(array($currentValue), array("fixed" => "fixed", "banner" => "banner", "scroll" => "scroll"), false, true);
             echo "</select>\n";
             break;
     }
 }
Пример #5
0
/**
 * Generates the option list for the language selectin <select>
 * @param bool $HTTPAccept set to true to include the HTTPAccept item
 *
 */
function generateLanguageOptionList($HTTPAccept)
{
    global $_zp_active_languages;
    if (is_null($_zp_active_languages)) {
        $_zp_active_languages = generateLanguageList();
    }
    $locales = $_zp_active_languages;
    if ($HTTPAccept) {
        // for admin only
        $locales[gettext("HTTP Accept Language")] = '';
    }
    generateListFromArray(array(getOption('locale', $HTTPAccept)), $locales, false, true);
}
Пример #6
0
 function handleOption($option, $currentValue)
 {
     switch ($option) {
         case 'simplicity2_personality':
             $theme = basename(dirname(__FILE__));
             $themeroot = SERVERPATH . "/themes/{$theme}/personality";
             $folders = $this->getFolderList($themeroot);
             echo '<select id="themeselect" name="' . $option . '"' . ">\n";
             echo "<option value=''>&nbsp;</option>";
             echo "<option value='__random__'>Random</option>";
             generateListFromArray(array($currentValue), $folders, false, true);
             echo "</select>\n";
             break;
     }
 }
Пример #7
0
 function handleOption($option, $currentValue)
 {
     switch ($option) {
         case 'garland_menu':
             $menusets = array();
             echo '<select id="garland_menuset" name="garland_menu"';
             if (function_exists('printCustomMenu') && getThemeOption('custom_index_page', NULL, 'garland') === 'gallery') {
                 $result = query_full_array("SELECT DISTINCT menuset FROM " . prefix('menu') . " ORDER BY menuset");
                 foreach ($result as $set) {
                     $menusets[$set['menuset']] = $set['menuset'];
                 }
             } else {
                 echo ' disabled="disabled"';
             }
             echo ">\n";
             echo '<option value="" style="background-color:LightGray">' . gettext('*standard menu') . '</option>';
             generateListFromArray(array($currentValue), $menusets, false, false);
             echo "</select>\n";
             break;
     }
 }
Пример #8
0
function switcher_controllink($ignore)
{
    global $themecolors;
    $color = getOption('themeSwitcher_default_color');
    if (!$color) {
        $color = getOption('Theme_colors');
    }
    ?>
	<span title="<?php 
    echo gettext("Default theme color scheme.");
    ?>
">
		<?php 
    echo gettext('Theme Color');
    ?>
		<select name="themeColor" id="themeColor" onchange="switchColors();">
			<?php 
    generateListFromArray(array($color), $themecolors, false, false);
    ?>
		</select>
	</span>
	<?php 
    return $ignore;
}
Пример #9
0
    function handleOption($option, $currentValue)
    {
        $sort = array(gettext('Filename') => 'filename', gettext('Custom') => 'custom', gettext('Date') => 'date', gettext('Title') => 'title', gettext('ID') => 'id', gettext('Filemtime') => 'mtime', gettext('Owner') => 'owner', gettext('Published') => 'show');
        switch ($option) {
            case 'favorites_albumsort':
                ?>
				<span class="nowrap">
					<select id="albumsortselect" name="subalbumsortby" onchange="update_direction(this, 'album_direction_div', 'album_custom_div');">
						<?php 
                $cvt = $type = strtolower(getOption('favorites_album_sort_type'));
                if ($type && !in_array($type, $sort)) {
                    $cv = array('custom');
                } else {
                    $cv = array($type);
                }
                generateListFromArray($cv, $sort, false, true);
                ?>
					</select>
					<?php 
                if ($type == 'random' || $type == '') {
                    $dsp = 'none';
                } else {
                    $dsp = 'inline';
                }
                ?>
					<label id="album_direction_div" style="display:<?php 
                echo $dsp;
                ?>
;white-space:nowrap;">
						<?php 
                echo gettext("Descending");
                ?>
						<input type="checkbox" name="album_sortdirection" value="1"
						<?php 
                if (getOption('favorites_album_sort_direction')) {
                    echo "CHECKED";
                }
                ?>
 />
					</label>
				</span>
				<?php 
                break;
            case 'favorites_imagesort':
                ?>
				<span class="nowrap">
					<select id="imagesortselect" name="sortby" onchange="update_direction(this, 'image_direction_div', 'image_custom_div')">
						<?php 
                $cvt = $type = strtolower(getOption('favorites_image_sort_type'));
                if ($type && !in_array($type, $sort)) {
                    $cv = array('custom');
                } else {
                    $cv = array($type);
                }
                generateListFromArray($cv, $sort, false, true);
                ?>
					</select>
					<?php 
                if ($type == 'random' || $type == '') {
                    $dsp = 'none';
                } else {
                    $dsp = 'inline';
                }
                ?>
					<label id="image_direction_div" style="display:<?php 
                echo $dsp;
                ?>
;white-space:nowrap;">
						<?php 
                echo gettext("Descending");
                ?>
						<input type="checkbox" name="image_sortdirection" value="1"
						<?php 
                if (getOption('favorites_image_sort_direction')) {
                    echo ' checked="checked"';
                }
                ?>
 />
					</label>
				</span>
				<?php 
                break;
        }
    }
Пример #10
0
 style="background-color:LightGray"><?php 
                        echo gettext('*no watermark');
                        ?>
</option>
																<option value="" <?php 
                        if (empty($current)) {
                            echo ' selected="selected"';
                        }
                        ?>
 style="background-color:LightGray"><?php 
                        echo gettext('*default');
                        ?>
</option>
																<?php 
                        $watermarks = getWatermarks();
                        generateListFromArray(array($current), $watermarks, false, false);
                        ?>
															</select>
															<span id="WMUSE_<?php 
                        echo $currentimage;
                        ?>
" style="display:<?php 
                        if ($current == '') {
                            echo 'none';
                        } else {
                            echo 'inline';
                        }
                        ?>
">
																			<?php 
                        $wmuse = $image->getWMUse();
Пример #11
0
$themes = $_zp_gallery->getThemes();
if (empty($themename)) {
    $current_theme = $galleryTheme;
    $theme = $themes[$galleryTheme];
    $themenamedisplay = '</em><small>' . gettext("no theme assigned, defaulting to Gallery theme") . '</small><em>';
    $gallerydefault = true;
} else {
    $theme = $themes[$themename];
    $themenamedisplay = $theme['name'];
    $gallerydefault = false;
}
if (count($themelist) > 1) {
    echo '<form action="#" method="post">';
    echo gettext("Show theme for: ");
    echo '<select id="themealbum" name="themealbum" onchange="this.form.submit()">';
    generateListFromArray(array(pathurlencode($alb)), $themelist, false, true);
    echo '</select>';
    echo '</form>';
}
if (count($themelist) == 0) {
    echo '<div class="errorbox" id="no_themes">';
    echo "<h2>" . gettext("There are no themes for which you have rights to administer.") . "</h2>";
    echo '</div>';
} else {
    echo "<h1>" . sprintf(gettext('Current theme for <code><strong>%1$s</strong></code>: <em>%2$s</em>'), $albumtitle, $themenamedisplay);
    if (!empty($alb) && !empty($themename)) {
        ?>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<a class="reset" onclick="launchScript('',['action=settheme','themealbum=<?php 
        echo pathurlencode($album->name);
        ?>
Пример #12
0
                echo gettext('Drag the albums into the order you wish them displayed.');
                ?>
						<form name="gallery_sort" style="float: right;" method="post" action="<?php 
                echo WEBPATH . '/' . ZENFOLDER;
                ?>
/admin-edit.php?page=edit&action=gallery_sortorder" >
							<?php 
                XSRFToken('gallery_sortorder');
                ?>
							<span class="nowrap">
								<?php 
                echo gettext('Sort albums by:');
                ?>
								<select id="albumsortselect" name="gallery_sortby" onchange="this.form.submit();">
									<?php 
                generateListFromArray($cv, $sort, false, true);
                ?>
								</select>
							</span>
						</form>
						<br clear="all">
						<p class="notebox">
							<?php 
                echo gettext('<strong>Note:</strong> Dragging an album under a different parent will move the album. You cannot move albums under a <em>dynamic</em> album.');
                ?>
						</p>
						<?php 
            }
            ?>
					<p>
						<?php 
Пример #13
0
		<div id="main">
			<?php 
    printTabs();
    ?>
			<div id="content">
				<h1><?php 
    echo gettext('Find injected quotes in translation files.');
    ?>
</h1>
				<form	action="<?php 
    echo WEBPATH . "/" . USER_PLUGIN_FOLDER . '/' . 'findQuotes.php';
    ?>
" method="post">
					<select name="language">
						<?php 
    generateListFromArray(array($selected), $list, false, true);
    ?>
					</select>
					<button type="submit"><?php 
    echo gettext('Go');
    ?>
</button>
				</form>
				<?php 
    if ($lang) {
        if ($lang == 'en_US') {
            $filepath = SERVERPATH . '/' . ZENFOLDER . '/locale/de_DE/LC_MESSAGES/zenphoto.po';
            // presumed to be up-to-date
        } else {
            $filepath = SERVERPATH . '/' . ZENFOLDER . '/locale/' . $lang . '/LC_MESSAGES/zenphoto.po';
        }
Пример #14
0
    /**
     *
     * places a selector so a user may change thems
     * @param string $text link text
     */
    static function controlLink($textIn = NULL)
    {
        global $_zp_gallery, $_themeSwitcherThemelist, $_zp_gallery_page;
        if (self::active()) {
            $themes = array();
            foreach ($_zp_gallery->getThemes() as $theme => $details) {
                if ($_themeSwitcherThemelist[$theme]) {
                    if (getPlugin($_zp_gallery_page, $theme)) {
                        $themes[$details['name']] = $theme;
                    }
                }
            }
            $text = $textIn;
            if (empty($text)) {
                $text = gettext('Theme');
            }
            $reloc = pathurlencode(trim(preg_replace('~themeSwitcher=.*?&~', '', getRequestURI() . '&'), '?&'));
            if (strpos($reloc, '?')) {
                $reloc .= '&themeSwitcher=%t';
            } else {
                $reloc .= '?themeSwitcher=%t';
            }
            $theme = $_zp_gallery->getCurrentTheme();
            ?>
			<span class="themeSwitcherControlLink">
				<span title="<?php 
            echo gettext("Themes will not show in this list if selecting them would result in a “not found” error.");
            ?>
">
					<?php 
            echo $text;
            ?>
					<select name="themeSwitcher" id="themeSwitcher" onchange="switchTheme('<?php 
            echo html_encode($reloc);
            ?>
')">
						<?php 
            generateListFromArray(array($theme), $themes, false, true);
            ?>
					</select>
				</span>
				<?php 
            zp_apply_filter('themeSwitcher_Controllink', $theme);
            ?>
			</span>
			<?php 
        }
        return $textIn;
    }
Пример #15
0
    static function watermark($image, $i, $field, $type)
    {
        if ($type == 'save') {
            if (isset($_POST[$i . '-' . $field['name']])) {
                $wmt = sanitize($_POST[$i . '-' . $field['name']], 3);
                $image->setWatermark($wmt);
                $wmuse = 0;
                if (isset($_POST['wm_image-' . $i])) {
                    $wmuse = $wmuse | WATERMARK_IMAGE;
                }
                if (isset($_POST['wm_thumb-' . $i])) {
                    $wmuse = $wmuse | WATERMARK_THUMB;
                }
                if (isset($_POST['wm_full-' . $i])) {
                    $wmuse = $wmuse | WATERMARK_FULL;
                }
                $image->setWMUse($wmuse);
                $image->save();
            }
            return NULL;
        } else {
            $item = NULL;
            if ($image->isMyItem($image->manage_some_rights)) {
                $current = $image->getWatermark();
                ob_start();
                ?>
				<select id="image_watermark-<?php 
                echo $i;
                ?>
" name="<?php 
                echo $i . '-' . $field['name'];
                ?>
" onclick="toggleWMUse(<?php 
                echo $i;
                ?>
);">
					<option value="<?php 
                echo NO_WATERMARK;
                ?>
" <?php 
                if ($current == NO_WATERMARK) {
                    echo ' selected = "selected"';
                }
                ?>
 style="background-color:LightGray"><?php 
                echo gettext('*no watermark');
                ?>
</option>
					<option value="" <?php 
                if (empty($current)) {
                    echo ' selected = "selected"';
                }
                ?>
 style="background-color:LightGray"><?php 
                echo gettext('*default');
                ?>
</option>
					<?php 
                $watermarks = getWatermarks();
                generateListFromArray(array($current), $watermarks, false, false);
                ?>
				</select>
				<?php 
                if ($current == '') {
                    $displaystyle = 'none';
                } else {
                    $displaystyle = 'inline';
                }
                ?>
				<span id="WMUSE_<?php 
                echo $i;
                ?>
" style="display:<?php 
                echo $displaystyle;
                ?>
">
					<?php 
                $wmuse = $image->getWMUse();
                ?>
					<label><input type="checkbox" value="1" id="wm_image-<?php 
                echo $i;
                ?>
" name="wm_image-<?php 
                echo $i;
                ?>
" <?php 
                if ($wmuse & WATERMARK_IMAGE) {
                    echo 'checked="checked"';
                }
                ?>
 /><?php 
                echo gettext('image');
                ?>
</label>
					<label><input type="checkbox" value="1" id="wm_thumb-<?php 
                echo $i;
                ?>
" name="wm_thumb-<?php 
                echo $i;
                ?>
" <?php 
                if ($wmuse & WATERMARK_THUMB) {
                    echo 'checked="checked"';
                }
                ?>
 /><?php 
                echo gettext('thumb');
                ?>
</label>
					<label><input type="checkbox" value="1" id="wm_full-<?php 
                echo $i;
                ?>
" name="wm_full-<?php 
                echo $i;
                ?>
" <?php 
                if ($wmuse & WATERMARK_FULL) {
                    echo 'checked="checked"';
                }
                ?>
 /><?php 
                echo gettext('full image');
                ?>
</label>
				</span>
				<?php 
                $item = ob_get_contents();
                ob_end_clean();
            }
            return $item;
        }
    }
/**
 * Prints a dropdown to select the author of a page or news article (Admin rights users only)
 *
 * @param string $currentadmin The current admin is selected if adding a new article, otherwise the original author
 */
function authorSelector($author = NULL)
{
    global $_zp_authority, $_zp_current_admin_obj;
    if (empty($author)) {
        $author = $_zp_current_admin_obj->getUser();
    }
    $authors = array($author => $author);
    if (zp_loggedin(MANAGE_ALL_PAGES_RIGHTS | MANAGE_ALL_NEWS_RIGHTS)) {
        $admins = $_zp_authority->getAdministrators();
        foreach ($admins as $admin) {
            if ($admin['rights'] & (ADMIN_RIGHTS | ZENPAGE_PAGES_RIGHTS | ZENPAGE_NEWS_RIGHTS)) {
                $authors[$admin['user']] = $admin['user'];
            }
        }
    }
    ?>
	<select size='1' name="author" id="author">
		<?php 
    generateListFromArray(array($author), $authors, false, false);
    ?>
	</select>
	<?php 
}
Пример #17
0
/**
 * Edit tab bulk actions drop-down
 * @param array $checkarray the list of actions
 * @param bool $checkAll set true to include check all box
 */
function printBulkActions($checkarray, $checkAll = false)
{
    $customInfo = $colorboxBookmark = array();
    foreach ($checkarray as $key => $value) {
        if (is_array($value)) {
            $checkarray[$key] = $value['name'];
            switch ($action = $value['action']) {
                case 'mass_customTextarea_data':
                    $data['size'] = -1;
                case 'mass_customText_data':
                    $customInfo[$value['name']] = $value;
                    $action = 'mass_' . $value['name'] . '_data';
                    break;
            }
            $colorboxBookmark[$value['name']] = $action;
        }
    }
    if (!empty($colorboxBookmark)) {
        ?>
		<script type="text/javascript">
			//<!-- <![CDATA[
			function checkFor(obj) {
				var sel = obj.options[obj.selectedIndex].value;
				var mark;
				switch (sel) {
		<?php 
        foreach ($colorboxBookmark as $key => $mark) {
            ?>
					case '<?php 
            echo $key;
            ?>
':
									mark = '<?php 
            echo $mark;
            ?>
';
									break;
			<?php 
        }
        ?>
				default:
								mark = false;
								break;
			}
			if (mark) {
				$.colorbox({
					href: '#' + mark,
					inline: true,
					open: true,
					close: '<?php 
        echo gettext("ok");
        ?>
'
				});
				}
			}
			// ]]> -->
		</script>
		<?php 
    }
    ?>
	<span style="float:right">
		<select class="ignoredirty" name="checkallaction" id="checkallaction" size="1" onchange="checkFor(this);" >
			<?php 
    generateListFromArray(array('noaction'), $checkarray, false, true);
    ?>
		</select>
		<?php 
    if ($checkAll) {
        ?>
			<br />
			<?php 
        echo gettext("Check All");
        ?>
			<input class="ignoredirty" type="checkbox" name="allbox" id="allbox" onclick="checkAll(this.form, 'ids[]', this.checked);" />
			<?php 
    }
    ?>
	</span>
	<?php 
    foreach ($customInfo as $key => $data) {
        ?>
		<div id="mass_<?php 
        echo $key;
        ?>
" style="display:none;
				 ">
			<div id="mass_<?php 
        echo $key;
        ?>
_data">
				<?php 
        printf('Value for %s:', $data['desc']);
        if ($data['action'] == 'mass_customText_data') {
            if (isset($data['size']) && $data['size'] >= 0) {
                $size = max(5, min($data['size'], 200));
            } else {
                $size = 100;
            }
            ?>
					<input type="text" name="<?php 
            echo $key;
            ?>
" size="<?php 
            echo $size;
            ?>
" value="">
					<?php 
        } else {
            ?>
					<textarea name="<?php 
            echo $key;
            ?>
" cols="<?php 
            echo TEXTAREA_COLUMNS;
            ?>
"	style="width: 320px" rows="6"></textarea>
					<?php 
        }
        ?>
			</div>
		</div>
		<?php 
    }
    if (in_array('mass_tags_data', $colorboxBookmark)) {
        ?>
		<div id="mass_tags" style="display:none;">
			<div id="mass_tags_data">
				<?php 
        tagSelector(NULL, 'mass_tags_', false, getTagOrder(), true, false, 'checkTagsAuto ignoredirty');
        ?>
			</div>
		</div>
		<?php 
    }
    if (in_array('mass_cats_data', $colorboxBookmark)) {
        ?>
		<div id="mass_cats" style="display:none;">
			<div id="mass_cats_data">
				<?php 
        echo gettext('New categorys:');
        ?>
				<ul>
					<?php 
        printNestedItemsList('cats-checkboxlist', '', 'all', 'ignoredirty');
        ?>
				</ul>
			</div>
		</div>
		<?php 
    }
    if (in_array('mass_owner_data', $colorboxBookmark)) {
        ?>
		<div id="mass_owner" style="display:none;">
			<div id="mass_owner_data">
				<?php 
        echo gettext('New owner:');
        ?>
				<ul>
					<select class="ignoredirty" id="massownermenu" name="massownerselect" onchange="">
						<?php 
        echo admin_album_list(NULL);
        ?>
					</select>
				</ul>
			</div>
		</div>
		<?php 
    }
    if (in_array('mass_movecopy_data', $colorboxBookmark)) {
        global $mcr_albumlist, $album, $bglevels;
        ?>
		<div id="mass_movecopy_copy" style="display:none;">
			<div id="mass_movecopy_data">
				<input type="hidden" name="massfolder" value="<?php 
        echo $album->name;
        ?>
" />
				<?php 
        echo gettext('Destination');
        ?>
				<select class="ignoredirty" id="massalbumselectmenu" name="massalbumselect" onchange="">
					<?php 
        foreach ($mcr_albumlist as $fullfolder => $albumtitle) {
            $singlefolder = $fullfolder;
            $saprefix = "";
            $salevel = 0;
            $selected = "";
            if ($album->name == $fullfolder) {
                $selected = " selected=\"selected\" ";
            }
            // Get rid of the slashes in the subalbum, while also making a subalbum prefix for the menu.
            while (strstr($singlefolder, '/') !== false) {
                $singlefolder = substr(strstr($singlefolder, '/'), 1);
                $saprefix = "&nbsp; &nbsp;&nbsp;" . $saprefix;
                $salevel++;
            }
            echo '<option value="' . $fullfolder . '"' . ($salevel > 0 ? ' style="background-color: ' . $bglevels[$salevel] . ';"' : '') . "{$selected}>" . $saprefix . $singlefolder . "</option>\n";
        }
        ?>
				</select>
			</div>
		</div>
		<?php 
    }
}
Пример #18
0
				</select>
			</td>
		</tr>
		<tr>
			<td><?php 
echo gettext("Thumbnail:");
?>
</td>
			<td>
				<select id="thumb" name="thumb">
					<?php 
$selections = array();
foreach ($_zp_albumthumb_selector as $key => $selection) {
    $selections[$selection['desc']] = $key;
}
generateListFromArray(array(getOption('AlbumThumbSelect')), $selections, false, true);
$showThumb = $_zp_gallery->getThumbSelectImages();
foreach ($imagelist as $imagepath) {
    $pieces = explode('/', $imagepath);
    $filename = array_pop($pieces);
    $folder = implode('/', $pieces);
    $albumx = newAlbum($folder);
    $image = newImage($albumx, $filename);
    if (isImagePhoto($image) || !is_null($image->objectsThumb)) {
        echo "\n<option class=\"thumboption\"";
        if ($showThumb) {
            echo " style=\"background-image: url(" . html_encode($image->getSizedImage(80)) . "); background-repeat: no-repeat;\"";
        }
        echo " value=\"" . $imagepath . "\"";
        echo ">" . $image->getTitle();
        echo " ({$imagepath})";
Пример #19
0
                    ?>
</td>
				<td>
					<select id="user_registration_page" name="user_registration_page">
						<option value=''>
						<?php 
                    $curdir = getcwd();
                    $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
                    chdir($root);
                    $filelist = safe_glob('*.php');
                    $list = array();
                    foreach ($filelist as $file) {
                        $list[] = str_replace('.php', '', FilesystemToUTF8($file));
                    }
                    $list = array_diff($list, array('themeoptions', 'theme_description', '404', 'slideshow', 'search', 'image', 'index', 'album', 'customfunctions', 'news', 'pages'));
                    generateListFromArray(array(getThemeOption($album, 'user_registration_page')), $list, false, false);
                    chdir($curdir);
                    ?>
					</select>
					<br />
					<?php 
                    echo gettext('Link text') . ' ';
                    print_language_string_list(getThemeOption($album, 'user_registration_text'), 'user_registration_text');
                    ?>
					<br />
					<?php 
                    echo gettext('Hint text') . ' ';
                    print_language_string_list(getThemeOption($album, 'user_registration_tip'), 'user_registration_tip');
                    ?>
				</td>
				<td><?php 
Пример #20
0
        $file = str_replace('.zdb', '', $file);
        $list[] = filesystemToInternal($file);
    }
    chdir($curdir);
    ?>
					<form name="restore_gallery" action="">
						<?php 
    XSRFToken('backup');
    ?>
						<?php 
    echo gettext('Select the database restore file:');
    ?>
						<br />
						<select id="backupfile" name="backupfile" onchange="$('#restore_button').removeAttr('disabled')">
							<?php 
    generateListFromArray(array(''), $list, true, false);
    ?>
						</select>
						<input type="hidden" name="restore" value="true" />
						<div class="buttons pad_button" id="dbrestore">
							<button id="restore_button" class="fixedwidth tooltip" type="submit" title="<?php 
    echo gettext("Restore the tables in your database from a previous backup.");
    ?>
" disabled="disabled">
								<img src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;
    ?>
/images/redo.png" alt="" /> <?php 
    echo gettext("Restore the Database");
    ?>
							</button>
Пример #21
0
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/cloneZenphoto/cloneTab.php';
?>
" method="post">
			<input type="hidden" name="path" id="newDir" value = "" />
			<?php 
if (empty($folderlist)) {
    echo gettext('No subfolders in: ') . ' ';
} else {
    echo gettext('Select the destination folder:') . ' ';
}
echo $path;
if (!empty($folderlist)) {
    ?>
				<select id="cloneFolder" name="cloneFolder" onchange="folderChange();">
				<?php 
    generateListFromArray(array(), $folderlist, false, true);
    ?>
				</select>
				<?php 
}
?>
			<span class="icons">
				<a id="upbutton" href="javascript:buttonAction('<?php 
echo $uppath;
?>
');" title="<?php 
echo $uptitle;
?>
">
					<img class="icon-position-top4" src="<?php 
echo WEBPATH . '/' . ZENFOLDER;
Пример #22
0
/**
 * Edit tab bulk actions drop-down
 * @param array $checkarray the list of actions
 * @param bool $checkAll set true to include check all box
 */
function printBulkActions($checkarray, $checkAll = false)
{
    $tags = in_array('addtags', $checkarray) || in_array('alltags', $checkarray);
    $movecopy = in_array('moveimages', $checkarray) || in_array('copyimages', $checkarray);
    $categories = in_array('addcats', $checkarray) || in_array('clearcats', $checkarray);
    $changeowner = in_array('changeowner', $checkarray);
    if ($tags || $movecopy || $categories || $changeowner) {
        ?>
		<script type="text/javascript">
			//<!-- <![CDATA[
			function checkFor(obj) {
				var sel = obj.options[obj.selectedIndex].value;
		<?php 
        if ($tags) {
            ?>
					if (sel == 'addtags' || sel == 'alltags') {
						$.colorbox({
							href: "#mass_tags_data",
							inline: true,
							open: true,
							close: '<?php 
            echo gettext("ok");
            ?>
'
						});
					}
			<?php 
        }
        if ($movecopy) {
            ?>
					if (sel == 'moveimages' || sel == 'copyimages') {
						$.colorbox({
							href: "#mass_movecopy_data",
							inline: true,
							open: true,
							close: '<?php 
            echo gettext("ok");
            ?>
'
						});
					}
			<?php 
        }
        if ($categories) {
            ?>
					if (sel == 'addcats') {
						$.colorbox({
							href: "#mass_cats_data",
							inline: true,
							open: true,
							close: '<?php 
            echo gettext("ok");
            ?>
'
						});
					}
			<?php 
        }
        if ($changeowner) {
            ?>
					if (sel == 'changeowner') {
						$.colorbox({
							href: "#mass_owner_data",
							inline: true,
							open: true,
							close: '<?php 
            echo gettext("ok");
            ?>
'
						});
					}
			<?php 
        }
        ?>
			}
			// ]]> -->
		</script>
		<?php 
    }
    ?>
	<span style="float:right">
		<select class="ays-ignore" name="checkallaction" id="checkallaction" size="1" onchange="checkFor(this);" >
			<?php 
    generateListFromArray(array('noaction'), $checkarray, false, true);
    ?>
		</select>
		<?php 
    if ($checkAll) {
        ?>
			<br />
			<?php 
        echo gettext("Check All");
        ?>
			<input class="ays-ignore" type="checkbox" name="allbox" id="allbox" onclick="checkAll(this.form, 'ids[]', this.checked);" />
			<?php 
    }
    ?>
	</span>
	<?php 
    if ($tags) {
        ?>
		<div id="mass_tags" style="display:none;">
			<div id="mass_tags_data">
				<?php 
        tagSelector(NULL, 'mass_tags_', false, false, true, false, 'checkTagsAuto ays-ignore');
        ?>
			</div>
		</div>
		<?php 
    }
    if ($categories) {
        ?>
		<div id="mass_cats" style="display:none;">
			<ul id="mass_cats_data">
				<?php 
        printNestedItemsList('cats-checkboxlist', '', 'all', 'ays-ignore');
        ?>
			</ul>
		</div>
		<?php 
    }
    if ($changeowner) {
        ?>
		<div id="mass_owner" style="display:none;">
			<ul id="mass_owner_data">
				<select class="ays-ignore" id="massownermenu" name="massownerselect" onchange="">
					<?php 
        echo admin_album_list(NULL);
        ?>
				</select>
			</ul>
		</div>
		<?php 
    }
    if ($movecopy) {
        global $mcr_albumlist, $album, $bglevels;
        ?>
		<div id="mass_movecopy_copy" style="display:none;">
			<div id="mass_movecopy_data">
				<input type="hidden" name="massfolder" value="<?php 
        echo $album->name;
        ?>
" />
				<?php 
        echo gettext('Destination');
        ?>
				<select class="ays-ignore" id="massalbumselectmenu" name="massalbumselect" onchange="">
					<?php 
        foreach ($mcr_albumlist as $fullfolder => $albumtitle) {
            $singlefolder = $fullfolder;
            $saprefix = "";
            $salevel = 0;
            $selected = "";
            if ($album->name == $fullfolder) {
                $selected = " selected=\"selected\" ";
            }
            // Get rid of the slashes in the subalbum, while also making a subalbum prefix for the menu.
            while (strstr($singlefolder, '/') !== false) {
                $singlefolder = substr(strstr($singlefolder, '/'), 1);
                $saprefix = "&nbsp; &nbsp;&nbsp;" . $saprefix;
                $salevel++;
            }
            echo '<option value="' . $fullfolder . '"' . ($salevel > 0 ? ' style="background-color: ' . $bglevels[$salevel] . ';"' : '') . "{$selected}>" . $saprefix . $singlefolder . "</option>\n";
        }
        ?>
				</select>
			</div>
		</div>
		<?php 
    }
}
Пример #23
0
    function handleOption($option, $currentValue)
    {
        global $themecolors;
        switch ($option) {
            case 'Theme_colors':
                echo '<select id="EF_themeselect_colors" name="' . $option . '"' . ">\n";
                generateListFromArray(array($currentValue), $themecolors, false, false);
                echo "</select>\n";
                break;
            case 'effervescence_menu':
                $menusets = array($currentValue => $currentValue);
                echo '<select id="EF_menuset" name="effervescence_menu"';
                if (function_exists('printCustomMenu')) {
                    $result = query_full_array("SELECT DISTINCT menuset FROM " . prefix('menu') . " ORDER BY menuset");
                    foreach ($result as $set) {
                        $menusets[$set['menuset']] = $set['menuset'];
                    }
                } else {
                    echo ' disabled="disabled"';
                }
                echo ">\n";
                echo '<option value="" style="background-color:LightGray">' . gettext('*standard menu') . '</option>';
                generateListFromArray(array($currentValue), $menusets, false, false);
                echo "</select>\n";
                break;
            case 'Graphic_logo':
                ?>
				<select id="EF_themeselect_logo" name="Graphic_logo">
					<option value="" style="background-color:LightGray"><?php 
                echo gettext('*no logo selected');
                ?>
</option>';
					<option value="*"<?php 
                if ($currentValue == '*') {
                    echo ' selected="selected"';
                }
                ?>
><?php 
                echo gettext('Effervescence');
                ?>
</option>';
					<?php 
                generateListFromFiles($currentValue, SERVERPATH . '/' . UPLOAD_FOLDER . '/images', '.png');
                ?>
				</select>
				<?php 
                break;
        }
    }
/**
 * Prints the selector for custom pages
 *
 * @return string
 */
function printCustomPageSelector($current)
{
    global $_zp_gallery;
    ?>
	<select id="custompageselector" name="custompageselect">
		<?php 
    $curdir = getcwd();
    $themename = $_zp_gallery->getCurrentTheme();
    $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
    chdir($root);
    $filelist = safe_glob('*.php');
    $list = array();
    foreach ($filelist as $file) {
        $file = filesystemToInternal($file);
        $list[$file] = str_replace('.php', '', $file);
    }
    generateListFromArray(array($current), $list, false, true);
    chdir($curdir);
    ?>
	</select>
	<?php 
}
Пример #25
0
/**
 * Generates a selection list from files found on disk
 *
 * @param strig $currentValue the current value of the selector
 * @param string $root directory path to search
 * @param string $suffix suffix to select for
 * @param bool $descending set true to get a reverse order sort
 */
function generateListFromFiles($currentValue, $root, $suffix, $descending = false)
{
    if (is_dir($root)) {
        $curdir = getcwd();
        chdir($root);
        $filelist = safe_glob('*' . $suffix);
        $list = array();
        foreach ($filelist as $file) {
            $file = str_replace($suffix, '', $file);
            $list[] = filesystemToInternal($file);
        }
        generateListFromArray(array($currentValue), $list, $descending, false);
        chdir($curdir);
    }
}
Пример #26
0
    ?>
					<span class="buttons">
						<strong><a href="javascript:deleteMenuSet();" title="<?php 
    echo $buttontext;
    ?>
"><img src="../../images/fail.png" alt="" /><?php 
    echo $buttontext;
    ?>
</a></strong>
					</span>
					<?php 
}
?>
			<select name="checkallaction" id="checkallaction" size="1">
				<?php 
generateListFromArray(array('noaction'), $checkarray, false, true);
?>
			</select>
		</span>
	</div>
	<br clear="all" />
	<div class="subhead">
		<label style="float: right"><?php 
echo gettext("Check All");
?>
 <input type="checkbox" name="allbox" id="allbox" onclick="checkAll(this.form, 'ids[]', this.checked);" />
		</label>
	</div>
			<ul class="page-list">
			<?php 
if (isset($_GET['visible'])) {
Пример #27
0
function switcher_controllink($ignore)
{
    global $personalities, $themecolors, $_zp_gallery_page;
    $color = getOption('themeSwitcher_effervescence_color');
    if (!$color) {
        list($personality, $color) = getPersonality();
    }
    ?>
	<span id="themeSwitcher_effervescence">
		<span title="<?php 
    echo gettext("Effervescence color scheme.");
    ?>
">
			<?php 
    echo gettext('Theme Color');
    ?>
			<select name="themeColor" id="themeColor" onchange="switchColors();">
				<?php 
    generateListFromArray(array($color), $themecolors, false, false);
    ?>
			</select>
		</span>
		<?php 
    $personality = getOption('themeSwitcher_effervescence_personality');
    if (!$personality) {
        $personality = getOption('effervescence_personality');
    }
    ?>
		<span title="<?php 
    echo gettext("Effervescence image display handling.");
    ?>
">
			<?php 
    echo gettext('Personality');
    ?>
			<select name="themePersonality" id="themePersonality" onchange="switchPersonality();">
				<?php 
    generateListFromArray(array($personality), $personalities, false, true);
    ?>
			</select>
		</span>
	</span>
	<?php 
    return $ignore;
}
Пример #28
0
						<button class="fixedwidth" type="submit"
										title="<?php 
echo gettext("Sets all album thumbs to the selected criteria");
?>
">
							<img src="<?php 
echo $webpath;
?>
images/burst.png" alt="" />
							<?php 
echo gettext("Set all albums to");
?>
						</button>
						<select id="thumbtype" name="thumbtype">
							<?php 
generateListFromArray(array($current), $selections, false, true);
?>
						</select>
					</div>
					<br class="clearall" /> <br />
				</form>
				<br class="clearall" /> <br />
			</div>
		</div>
	</div><!-- content -->
</div><!-- main -->
<?php 
printAdminFooter();
?>
</body>
<?php 
Пример #29
0
													<option value="" style="background-color:LightGray"><?php 
            echo gettext('none');
            ?>
</option>
													<?php 
            $curdir = getcwd();
            $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
            chdir($root);
            $filelist = safe_glob('*.php');
            $list = array();
            foreach ($filelist as $file) {
                $file = filesystemToInternal($file);
                $list[$file] = str_replace('.php', '', $file);
            }
            $list = array_diff($list, standardScripts());
            generateListFromArray(array(getThemeOption('custom_index_page', $album, $themename)), $list, false, true);
            chdir($curdir);
            ?>
												</select>
											</td>
											<td><?php 
            echo gettext("If this option is not empty, the Gallery Index URL that would normally link to the theme <code>index.php</code> script will instead link to this script. This frees up the <code>index.php</code> script so that you can create a customized <em>Home page</em> script. This option applies only to the main theme for the <em>Gallery</em>.");
            ?>
</td>
										</tr>
										<?php 
        }
        if (count($supportedOptions) > 0) {
            ?>
										<tr class="alt1" >
											<td align="left">
Пример #30
0
    echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/cloneZenphoto/cloneTab.php';
    ?>
" method="post">
							<input type="hidden" name="path" id="newDir" value = "" />
							<?php 
    if (empty($folderlist)) {
        echo gettext('No subfolders in: ') . ' ';
    } else {
        echo gettext('Select the destination folder:') . ' ';
    }
    echo $path;
    if (!empty($folderlist)) {
        ?>
								<select id="cloneFolder" name="cloneFolder" onchange="folderChange();">
									<?php 
        generateListFromArray($current, $folderlist, false, true);
        ?>
								</select>
								<?php 
    }
    ?>
							<span class="icons">
								<a id="upbutton" href="javascript:buttonAction('<?php 
    echo $uppath;
    ?>
');" title="<?php 
    echo $uptitle;
    ?>
">
									<img class="icon-position-top4" src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;