• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP generateListFromArray函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中generateListFromArray函数的典型用法代码示例。如果您正苦于以下问题:PHP generateListFromArray函数的具体用法?PHP generateListFromArray怎么用?PHP generateListFromArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了generateListFromArray函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: switcher_controllink

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;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:26,代码来源:functions.php


示例2: handleOption

 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";
     }
 }
开发者ID:benuri,项目名称:DevTools,代码行数:9,代码来源:themeoptions.php


示例3: handleOption

 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";
     }
 }
开发者ID:rb26,项目名称:zenphoto,代码行数:9,代码来源:themeoptions.php


示例4: handleOption

 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;
     }
 }
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:10,代码来源:themeoptions.php


示例5: generateLanguageOptionList

/**
 * 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);
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:18,代码来源:functions-i18n.php


示例6: handleOption

 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;
     }
 }
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:21,代码来源:themeoptions.php


示例7: handleOption

    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;
        }
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:84,代码来源:favoritesHandler.php


示例8: gettext

 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();
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:31,代码来源:admin-edit.php


示例9: gettext

$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);
        ?>
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:admin-themes.php


示例10: gettext

                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 
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-edit.php


示例11: printTabs

		<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';
        }
开发者ID:benuri,项目名称:DevTools,代码行数:31,代码来源:findQuotes.php


示例12: controlLink

    /**
     *
     * 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;
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:54,代码来源:themeSwitcher.php


示例13: watermark

    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;
                ?>
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:optionalObjectFields.php


示例14: authorSelector

/**
 * 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 
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:28,代码来源:zenpage-admin-functions.php


示例15: printBulkActions

/**
 * 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) {
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:admin-functions.php


示例16: gettext

				</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})";
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:admin-dynamic-album.php


示例17: getcwd

                    ?>
</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 
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:31,代码来源:admin-options.php


示例18: str_replace

        $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>
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:backup_restore.php


示例19: gettext

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;
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:cloneTab.php


示例20: printBulkActions

/**
 * 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 
//.........这里部分代码省略.........
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:101,代码来源:admin-functions.php



注:本文中的generateListFromArray函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP generateNavigation函数代码示例发布时间:2022-05-24
下一篇:
PHP generateHash函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap