当前位置: 首页>>代码示例>>PHP>>正文


PHP nggAdmin::can_manage_this_gallery方法代码示例

本文整理汇总了PHP中nggAdmin::can_manage_this_gallery方法的典型用法代码示例。如果您正苦于以下问题:PHP nggAdmin::can_manage_this_gallery方法的具体用法?PHP nggAdmin::can_manage_this_gallery怎么用?PHP nggAdmin::can_manage_this_gallery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nggAdmin的用法示例。


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

示例1: tab_uploadimage

    function tab_uploadimage()
    {
        global $ngg;
        // check the cookie for the current setting
        $checked = get_user_setting('ngg_upload_resize') ? ' checked="true"' : '';
        ?>
    	<!-- upload images -->
    	<h2><?php 
        _e('Upload Images', 'nggallery');
        ?>
</h2>
		<form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php 
        echo $this->filepath . '#uploadimage';
        ?>
" accept-charset="utf-8" >
		<?php 
        wp_nonce_field('ngg_addgallery');
        ?>
			<table class="form-table">
            
			<tr valign="top">
				<th scope="row"><?php 
        _e('Upload image', 'nggallery');
        ?>
</th>
                <?php 
        if ($ngg->options['swfUpload'] && defined('IS_WP_3_3')) {
            ?>
				<td>
                <div id="plupload-upload-ui">
                	<div>
                    	<?php 
            _e('Choose files to upload');
            ?>
                    	<input id="plupload-browse-button" type="button" value="<?php 
            esc_attr_e('Select Files');
            ?>
" class="button" />
                	</div>
                	<p class="ngg-dragdrop-info howto" style="display:none;" ><?php 
            _e('Or you can drop the files into this window.');
            ?>
</p>
                    <div id='uploadQueue'></div>
                    <p><label><input name="image_resize" type="checkbox" id="image_resize" value="true"<?php 
            echo $checked;
            ?>
 />
                        <?php 
            printf(__('Scale images to max width %1$dpx or max height %2$dpx', 'nggallery'), (int) $ngg->options['imgWidth'], (int) $ngg->options['imgHeight']);
            ?>
                        <div id='image_resize_pointer'>&nbsp;</div>
                        </label>
                    </p>
                    
                 </div>
                </td>
                <?php 
        } else {
            ?>
				<td><span id='spanButtonPlaceholder'></span><input type="file" name="imagefiles[]" id="imagefiles" size="35" class="imagefiles"/></td>
                <?php 
        }
        ?>
            </tr> 
			<tr valign="top"> 
				<th scope="row"><?php 
        _e('in to', 'nggallery');
        ?>
</th> 
				<td><select name="galleryselect" id="galleryselect">
				<option value="0" ><?php 
        _e('Choose gallery', 'nggallery');
        ?>
</option>
				<?php 
        foreach ($this->gallerylist as $gallery) {
            //special case : we check if a user has this cap, then we override the second cap check
            if (!current_user_can('NextGEN Upload in all galleries')) {
                if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
                    continue;
                }
            }
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . esc_attr($name) . '</option>' . "\n";
        }
        ?>
				</select>
				<br /><?php 
        echo $this->maxsize;
        ?>
				<br /><?php 
        if (is_multisite() && wpmu_enable_function('wpmuQuotaCheck')) {
            display_space_usage();
        }
        ?>
</td> 
			</tr> 
			</table>
			<div class="submit">
//.........这里部分代码省略.........
开发者ID:popovdenis,项目名称:kmst,代码行数:101,代码来源:addgallery.php

示例2: nggallery_manage_gallery_main


//.........这里部分代码省略.........
			<tbody>
<?php 
    if ($gallerylist) {
        //get the columns
        $gallery_columns = ngg_manage_gallery_columns();
        $hidden_columns = get_hidden_columns('nggallery-manage-images');
        $num_columns = count($gallery_columns) - count($hidden_columns);
        foreach ($gallerylist as $gallery) {
            $alternate = !isset($alternate) || $alternate == 'class="alternate"' ? '' : 'class="alternate"';
            $gid = $gallery->gid;
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            $author_user = get_userdata((int) $gallery->author);
            ?>
		<tr id="gallery-<?php 
            echo $gid;
            ?>
" <?php 
            echo $alternate;
            ?>
 >
		<?php 
            foreach ($gallery_columns as $gallery_column_key => $column_display_name) {
                $class = "class=\"{$gallery_column_key} column-{$gallery_column_key}\"";
                $style = '';
                if (in_array($gallery_column_key, $hidden_columns)) {
                    $style = ' style="display:none;"';
                }
                $attributes = "{$class}{$style}";
                switch ($gallery_column_key) {
                    case 'cb':
                        ?>
        			<th scope="row" class="cb column-cb">
        				<?php 
                        if (nggAdmin::can_manage_this_gallery($gallery->author)) {
                            ?>
        					<input name="doaction[]" type="checkbox" value="<?php 
                            echo $gid;
                            ?>
" />
        				<?php 
                        }
                        ?>
        			</th>
        			<?php 
                        break;
                    case 'id':
                        ?>
					<td <?php 
                        echo $attributes;
                        ?>
 scope="row"><?php 
                        echo $gid;
                        ?>
</td>
					<?php 
                        break;
                    case 'title':
                        ?>
        			<td>
        				<?php 
                        if (nggAdmin::can_manage_this_gallery($gallery->author)) {
                            ?>
        					<a href="<?php 
                            echo wp_nonce_url($ngg->manage_page->base_page . '&amp;mode=edit&amp;gid=' . $gid, 'ngg_editgallery');
                            ?>
" class='edit' title="<?php 
开发者ID:ahsaeldin,项目名称:projects,代码行数:67,代码来源:manage-galleries.php

示例3: nggallery_picturelist

function nggallery_picturelist($controller)
{
    // *** show picture list
    global $wpdb, $nggdb, $user_ID, $ngg;
    // Look if its a search result
    $is_search = isset($_GET['s']) ? true : false;
    $counter = 0;
    $wp_list_table = new _NGG_Images_List_Table('nggallery-manage-images');
    if ($is_search) {
        // fetch the imagelist
        $picturelist = $ngg->manage_page->search_result;
        // we didn't set a gallery or a pagination
        $act_gid = 0;
        $_GET['paged'] = 1;
        $page_links = false;
    } else {
        // GET variables
        $act_gid = $ngg->manage_page->gid;
        // Load the gallery metadata
        $mapper = C_Gallery_Mapper::get_instance();
        $gallery = $mapper->find($act_gid);
        if (!$gallery) {
            nggGallery::show_error(__('Gallery not found.', 'nggallery'));
            return;
        }
        // Check if you have the correct capability
        if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
            nggGallery::show_error(__('Sorry, you have no access here', 'nggallery'));
            return;
        }
        // look for pagination
        $_GET['paged'] = isset($_GET['paged']) && $_GET['paged'] > 0 ? absint($_GET['paged']) : 1;
        $items_per_page = 50;
        $start = ($_GET['paged'] - 1) * $items_per_page;
        // get picture values
        $image_mapper = C_Image_Mapper::get_instance();
        $total_number_of_images = count($image_mapper->select($image_mapper->get_primary_key_column())->where(array("galleryid = %d", $act_gid))->run_query(FALSE, TRUE));
        $picturelist = $image_mapper->select()->where(array("galleryid = %d", $act_gid))->order_by($ngg->options['galSort'], $ngg->options['galSortDir'])->limit($items_per_page, $start)->run_query();
        // get the current author
        $act_author_user = get_userdata((int) $gallery->author);
    }
    // list all galleries
    $gallerylist = $nggdb->find_all_galleries();
    //get the columns
    $image_columns = $wp_list_table->get_columns();
    $hidden_columns = get_hidden_columns('nggallery-manage-images');
    $num_columns = count($image_columns) - count($hidden_columns);
    $attr = nggGallery::current_user_can('NextGEN Edit gallery options') ? '' : 'disabled="disabled"';
    ?>
<script type="text/javascript">
<!--
function showDialog( windowId, title ) {
	var form = document.getElementById('updategallery');
	var elementlist = "";
	for (i = 0, n = form.elements.length; i < n; i++) {
		if(form.elements[i].type == "checkbox") {
			if(form.elements[i].name == "doaction[]")
				if(form.elements[i].checked == true)
					if (elementlist == "")
						elementlist = form.elements[i].value;
					else
						elementlist += "," + form.elements[i].value ;
		}
	}
	jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val());
	jQuery("#" + windowId + "_imagelist").val(elementlist);
    // now show the dialog
	jQuery( "#" + windowId ).dialog({
		width: 640,
        resizable : false,
		modal: true,
        title: title,
		position: {
			my:		'center',
			at:		'center',
			of:		window.parent
		}
	});
    jQuery("#" + windowId + ' .dialog-cancel').click(function() { jQuery( "#" + windowId ).dialog("close"); });
}

jQuery(function (){

    jQuery('span.tooltip, label.tooltip').tooltip();

    // load a content via ajax
    jQuery('a.ngg-dialog').click(function() {
    	var dialogs = jQuery('.ngg-overlay-dialog:visible');
    	if (dialogs.size() > 0) {
    		return false;
    	}

      if ( jQuery( "#spinner" ).length == 0) {
      	jQuery("body").append('<div id="spinner"></div>');
      }

    	var $this = jQuery(this);
      var results = new RegExp('[\\?&]w=([^&#]*)').exec(this.href);
    	var width  = ( results ) ? results[1] : 600;
      var results = new RegExp('[\\?&]h=([^&#]*)').exec(this.href);
//.........这里部分代码省略.........
开发者ID:bensethro,项目名称:runcyb,代码行数:101,代码来源:manage-images.php

示例4: nggallery_picturelist

function nggallery_picturelist()
{
    // *** show picture list
    global $wpdb, $nggdb, $user_ID, $ngg;
    // Look if its a search result
    $is_search = isset($_GET['s']) ? true : false;
    $counter = 0;
    $wp_list_table = new _NGG_Images_List_Table('nggallery-manage-images');
    if ($is_search) {
        // fetch the imagelist
        $picturelist = $ngg->manage_page->search_result;
        // we didn't set a gallery or a pagination
        $act_gid = 0;
        $_GET['paged'] = 1;
        $page_links = false;
    } else {
        // GET variables
        $act_gid = $ngg->manage_page->gid;
        // Load the gallery metadata
        $gallery = $nggdb->find_gallery($act_gid);
        if (!$gallery) {
            nggGallery::show_error(__('Gallery not found.', 'nggallery'));
            return;
        }
        // Check if you have the correct capability
        if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
            nggGallery::show_error(__('Sorry, you have no access here', 'nggallery'));
            return;
        }
        // look for pagination
        $_GET['paged'] = isset($_GET['paged']) && $_GET['paged'] > 0 ? absint($_GET['paged']) : 1;
        $start = ($_GET['paged'] - 1) * 50;
        // get picture values
        $picturelist = $nggdb->get_gallery($act_gid, $ngg->options['galSort'], $ngg->options['galSortDir'], false, 50, $start);
        // get the current author
        $act_author_user = get_userdata((int) $gallery->author);
    }
    // list all galleries
    $gallerylist = $nggdb->find_all_galleries();
    //get the columns
    $image_columns = $wp_list_table->get_columns();
    $hidden_columns = get_hidden_columns('nggallery-manage-images');
    $num_columns = count($image_columns) - count($hidden_columns);
    $attr = nggGallery::current_user_can('NextGEN Edit gallery options') ? '' : 'disabled="disabled"';
    ?>
<script type="text/javascript">
<!--
function showDialog( windowId, title ) {
	var form = document.getElementById('updategallery');
	var elementlist = "";
	for (i = 0, n = form.elements.length; i < n; i++) {
		if(form.elements[i].type == "checkbox") {
			if(form.elements[i].name == "doaction[]")
				if(form.elements[i].checked == true)
					if (elementlist == "")
						elementlist = form.elements[i].value;
					else
						elementlist += "," + form.elements[i].value ;
		}
	}
	jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val());
	jQuery("#" + windowId + "_imagelist").val(elementlist);
    // now show the dialog
	jQuery( "#" + windowId ).dialog({
		width: 640,
        resizable : false,
		modal: true,
        title: title,
		position: {
			my:		'center',
			at:		'center',
			of:		window.parent
		}
	});
    jQuery("#" + windowId + ' .dialog-cancel').click(function() { jQuery( "#" + windowId ).dialog("close"); });
}

jQuery(function (){

    jQuery('span.tooltip, label.tooltip').tooltip();

    // load a content via ajax
    jQuery('a.ngg-dialog').click(function() {
    	var dialogs = jQuery('.ngg-overlay-dialog:visible');
    	if (dialogs.size() > 0) {
    		return false;
    	}

      if ( jQuery( "#spinner" ).length == 0) {
      	jQuery("body").append('<div id="spinner"></div>');
      }

    	var $this = jQuery(this);
      var results = new RegExp('[\\?&]w=([^&#]*)').exec(this.href);
    	var width  = ( results ) ? results[1] : 600;
      var results = new RegExp('[\\?&]h=([^&#]*)').exec(this.href);
	    var height = ( results ) ? results[1] : 440;
      var container = window;

      if (window.parent) {
//.........这里部分代码省略.........
开发者ID:jeanpage,项目名称:ca_learn,代码行数:101,代码来源:manage-images.php

示例5: getImages

 /**
  * Method "ngg.getImages"
  * Return the list of all images inside a gallery
  * 
  * @since 1.4
  * 
  * @param array $args Method parameters.
  * 			- int blog_id
  *	    	- string username
  *	    	- string password
  *	    	- int gallery_id 
  * @return array with all images
  */
 function getImages($args)
 {
     global $nggdb;
     require_once dirname(dirname(__FILE__)) . '/admin/functions.php';
     // admin functions
     $this->escape($args);
     $blog_ID = (int) $args[0];
     $username = $args[1];
     $password = $args[2];
     $gid = (int) $args[3];
     if (!($user = $this->login($username, $password))) {
         return $this->error;
     }
     // Look for the gallery , could we find it ?
     if (!($gallery = nggdb::find_gallery($gid))) {
         return new IXR_Error(404, __('Could not find gallery ' . $gid));
     }
     // Now check if you have the correct capability for this gallery
     if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
         logIO('O', '(NGG) User does not have upload_files capability');
         $this->error = new IXR_Error(401, __('You are not allowed to upload files to this gallery.'));
         return $this->error;
     }
     // get picture values
     $picture_list = $nggdb->get_gallery($gid, 'pid', 'ASC', false);
     return $picture_list;
 }
开发者ID:rtgibbons,项目名称:bya.org,代码行数:40,代码来源:xmlrpc.php

示例6: nggallery_manage_gallery_main


//.........这里部分代码省略.........
<?php 
    if ($gallerylist) {
        //get the columns
        $gallery_columns = $wp_list_table->get_columns();
        $hidden_columns = get_hidden_columns('nggallery-manage-gallery');
        $num_columns = count($gallery_columns) - count($hidden_columns);
        $image_mapper = C_Image_Mapper::get_instance();
        foreach ($gallerylist as $gallery) {
            $alternate = !isset($alternate) || $alternate == 'class="alternate"' ? '' : 'class="alternate"';
            $gid = $gallery->gid;
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            $author_user = get_userdata((int) $gallery->author);
            ?>
		<tr id="gallery-<?php 
            echo $gid;
            ?>
" <?php 
            echo $alternate;
            ?>
 >
		<?php 
            foreach ($gallery_columns as $gallery_column_key => $column_display_name) {
                $class = "class=\"{$gallery_column_key} column-{$gallery_column_key}\"";
                $style = '';
                if (in_array($gallery_column_key, $hidden_columns)) {
                    $style = ' style="display:none;"';
                }
                $attributes = "{$class}{$style}";
                switch ($gallery_column_key) {
                    case 'cb':
                        ?>
        			<th scope="row" class="column-cb check-column">
        				<?php 
                        if (nggAdmin::can_manage_this_gallery($gallery->author)) {
                            ?>
        					<input name="doaction[]" type="checkbox" value="<?php 
                            echo $gid;
                            ?>
" />
        				<?php 
                        }
                        ?>
        			</th>
        			<?php 
                        break;
                    case 'id':
                        ?>
					<td <?php 
                        echo $attributes;
                        ?>
><?php 
                        echo $gid;
                        ?>
</td>
					<?php 
                        break;
                    case 'title':
                        ?>
        			<td class="title column-title">
        				<?php 
                        if (nggAdmin::can_manage_this_gallery($gallery->author)) {
                            ?>
        					<a href="<?php 
                            echo wp_nonce_url($ngg->manage_page->base_page . '&amp;mode=edit&amp;gid=' . $gid, 'ngg_editgallery');
                            ?>
" class='edit' title="<?php 
开发者ID:albinmartinsson91,项目名称:ux_blog,代码行数:67,代码来源:manage-galleries.php

示例7: tab_uploadimage

    function tab_uploadimage()
    {
        global $ngg;
        ?>
    	<!-- upload images -->
    	<h2><?php 
        _e('Upload Images', 'nggallery');
        ?>
</h2>
		<form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php 
        echo $this->filepath . '#uploadimage';
        ?>
" accept-charset="utf-8" >
		<?php 
        wp_nonce_field('ngg_addgallery');
        ?>
			<table class="form-table"> 
			<tr valign="top"> 
				<th scope="row"><?php 
        _e('Upload image', 'nggallery');
        ?>
</th>
				<td><span id='spanButtonPlaceholder'></span><input type="file" name="imagefiles[]" id="imagefiles" size="35" class="imagefiles"/></td>
			</tr> 
			<tr valign="top"> 
				<th scope="row"><?php 
        _e('in to', 'nggallery');
        ?>
</th> 
				<td><select name="galleryselect" id="galleryselect">
				<option value="0" ><?php 
        _e('Choose gallery', 'nggallery');
        ?>
</option>
				<?php 
        foreach ($this->gallerylist as $gallery) {
            //special case : we check if a user has this cap, then we override the second cap check
            if (!current_user_can('NextGEN Upload in all galleries')) {
                if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
                    continue;
                }
            }
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . $name . '</option>' . "\n";
        }
        ?>
				</select>
				<br /><?php 
        echo $this->maxsize;
        ?>
				<br /><?php 
        if (is_multisite() && wpmu_enable_function('wpmuQuotaCheck')) {
            display_space_usage();
        }
        ?>
</td> 
			</tr> 
			</table>
			<div class="submit">
				<?php 
        if ($ngg->options['swfUpload']) {
            ?>
				<input type="submit" name="disable_flash" id="disable_flash" title="<?php 
            _e('The batch upload requires Adobe Flash 10, disable it if you have problems', 'nggallery');
            ?>
" value="<?php 
            _e('Disable flash upload', 'nggallery');
            ?>
" />
				<?php 
        } else {
            ?>
				<input type="submit" name="enable_flash" id="enable_flash" title="<?php 
            _e('Upload multiple files at once by ctrl/shift-selecting in dialog', 'nggallery');
            ?>
" value="<?php 
            _e('Enable flash based upload', 'nggallery');
            ?>
" />
				<?php 
        }
        ?>
				<input class="button-primary" type="submit" name="uploadimage" id="uploadimage_btn" value="<?php 
        _e('Upload images', 'nggallery');
        ?>
" />
			</div>
		</form>
    <?php 
    }
开发者ID:besimhu,项目名称:legacy,代码行数:90,代码来源:addgallery.php

示例8: nggallery_picturelist

function nggallery_picturelist()
{
    // *** show picture list
    global $wpdb, $nggdb, $user_ID, $ngg;
    // Look if its a search result
    $is_search = isset($_GET['s']) ? true : false;
    if ($is_search) {
        // fetch the imagelist
        $picturelist = $ngg->manage_page->search_result;
        // we didn't set a gallery or a pagination
        $act_gid = 0;
        $_GET['paged'] = 1;
        $page_links = false;
    } else {
        // GET variables
        $act_gid = $ngg->manage_page->gid;
        // Load the gallery metadata
        $gallery = $nggdb->find_gallery($act_gid);
        if (!$gallery) {
            nggGallery::show_error(__('Gallery not found.', 'nggallery'));
            return;
        }
        // Check if you have the correct capability
        if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
            nggGallery::show_error(__('Sorry, you have no access here', 'nggallery'));
            return;
        }
        // look for pagination
        if (!isset($_GET['paged']) || $_GET['paged'] < 1) {
            $_GET['paged'] = 1;
        }
        $start = ($_GET['paged'] - 1) * 50;
        // get picture values
        $picturelist = $nggdb->get_gallery($act_gid, $ngg->options['galSort'], $ngg->options['galSortDir'], false, 50, $start);
        // build pagination
        $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'prev_text' => __('&laquo;'), 'next_text' => __('&raquo;'), 'total' => $nggdb->paged['max_objects_per_page'], 'current' => $_GET['paged']));
        // get the current author
        $act_author_user = get_userdata((int) $gallery->author);
    }
    // list all galleries
    $gallerylist = $nggdb->find_all_galleries();
    //get the columns
    $gallery_columns = ngg_manage_gallery_columns();
    $hidden_columns = get_hidden_columns('nggallery-manage-images');
    $num_columns = count($gallery_columns) - count($hidden_columns);
    ?>
<!--[if IE]>
	<style type="text/css">
		.custom_thumb {
			display : none;
		}
	</style>
<![endif]-->

<script type="text/javascript"> 
<!--

function showDialog( windowId, height ) {
	var form = document.getElementById('updategallery');
	var elementlist = "";
	for (i = 0, n = form.elements.length; i < n; i++) {
		if(form.elements[i].type == "checkbox") {
			if(form.elements[i].name == "doaction[]")
				if(form.elements[i].checked == true)
					if (elementlist == "")
						elementlist = form.elements[i].value
					else
						elementlist += "," + form.elements[i].value ;
		}
	}
	jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val());
	jQuery("#" + windowId + "_imagelist").val(elementlist);
	// console.log (jQuery("#TB_imagelist").val());
	tb_show("", "#TB_inline?width=640&height=" + height + "&inlineId=" + windowId + "&modal=true", false);
}

function checkAll(form)
{
	for (i = 0, n = form.elements.length; i < n; i++) {
		if(form.elements[i].type == "checkbox") {
			if(form.elements[i].name == "doaction[]") {
				if(form.elements[i].checked == true)
					form.elements[i].checked = false;
				else
					form.elements[i].checked = true;
			}
		}
	}
}

function getNumChecked(form)
{
	var num = 0;
	for (i = 0, n = form.elements.length; i < n; i++) {
		if(form.elements[i].type == "checkbox") {
			if(form.elements[i].name == "doaction[]")
				if(form.elements[i].checked == true)
					num++;
		}
	}
//.........这里部分代码省略.........
开发者ID:alx,项目名称:SimplePress,代码行数:101,代码来源:manage-images.php

示例9: nggallery_manage_gallery_main

function nggallery_manage_gallery_main()
{
    global $wpdb, $ngg;
    ?>
	<div class="wrap">
		<h2><?php 
    _e('Gallery Overview', 'nggallery');
    ?>
</h2>
		<br style="clear: both;"/>
		<table class="widefat">
			<thead>
			<tr>
				<th scope="col" ><?php 
    _e('ID');
    ?>
</th>
				<th scope="col" ><?php 
    _e('Title', 'nggallery');
    ?>
</th>
				<th scope="col" ><?php 
    _e('Description', 'nggallery');
    ?>
</th>
				<th scope="col" ><?php 
    _e('Author', 'nggallery');
    ?>
</th>
				<th scope="col" ><?php 
    _e('Page ID', 'nggallery');
    ?>
</th>
				<th scope="col" ><?php 
    _e('Quantity', 'nggallery');
    ?>
</th>
				<th scope="col" ><?php 
    _e('Action');
    ?>
</th>
			</tr>
			</thead>
			<tbody>
<?php 
    $gallerylist = nggdb::find_all_galleries('gid', 'asc', TRUE);
    if ($gallerylist) {
        foreach ($gallerylist as $gallery) {
            $class = $class == 'class="alternate"' ? '' : 'class="alternate"';
            $gid = $gallery->gid;
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            $author_user = get_userdata((int) $gallery->author);
            ?>
		<tr id="gallery-<?php 
            echo $gid;
            ?>
" <?php 
            echo $class;
            ?>
 >
			<th scope="row"><?php 
            echo $gid;
            ?>
</th>
			<td>
				<?php 
            if (nggAdmin::can_manage_this_gallery($gallery->author)) {
                ?>
					<a href="<?php 
                echo wp_nonce_url($ngg->manage_page->base_page . "&amp;mode=edit&amp;gid=" . $gid, 'ngg_editgallery');
                ?>
" class='edit' title="<?php 
                _e('Edit');
                ?>
" >
						<?php 
                echo $name;
                ?>
					</a>
				<?php 
            } else {
                ?>
					<?php 
                echo $gallery->title;
                ?>
				<?php 
            }
            ?>
			</td>
			<td><?php 
            echo $gallery->galdesc;
            ?>
&nbsp;</td>
			<td><?php 
            echo $author_user->display_name;
            ?>
</td>
			<td><?php 
            echo $gallery->pageid;
            ?>
//.........这里部分代码省略.........
开发者ID:pravinhirmukhe,项目名称:flow1,代码行数:101,代码来源:manage-galleries.php

示例10: tab_uploadimage

    function tab_uploadimage()
    {
        global $ngg;
        // check the cookie for the current setting
        //$checked = get_user_setting('ngg_upload_resize') ? ' checked="true"' : '';
        ?>
    	<!-- upload images -->
    	<h3><?php 
        _e('Upload images', 'nggallery');
        ?>
</h3>
		<form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php 
        echo $this->filepath . '#uploadimage';
        ?>
" accept-charset="utf-8" >
		<?php 
        wp_nonce_field('ngg_addgallery');
        ?>
			<table class="form-table">
			<tr valign="top">
				<td scope="row" style="padding: 0;" colspan="2"><?php 
        _e('in to', 'nggallery');
        ?>
<select style="margin-left:10px;" name="galleryselect" id="galleryselect">
				<option value="0" ><?php 
        _e('Choose gallery', 'nggallery');
        ?>
</option>
				<?php 
        foreach ($this->gallerylist as $gallery) {
            //special case : we check if a user has this cap, then we override the second cap check
            if (!current_user_can('NextGEN Upload in all galleries')) {
                if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
                    continue;
                }
            }
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . esc_attr($name) . '</option>' . "\n";
        }
        ?>
				</select>
				<br /><?php 
        echo $this->maxsize;
        ?>
				<br /><?php 
        if (is_multisite() && wpmu_enable_function('wpmuQuotaCheck')) {
            display_space_usage();
        }
        ?>
</td>
			</tr>
			<tr valign="top">
                <?php 
        if ($ngg->options['swfUpload']) {
            ?>
				<td colspan="2" style="padding: 0;">
                <div id="plupload-upload-ui">
				<div id="drag-drop-area" style="border: 4px dashed #bbb;height: 150px; padding:20px;">
				<div class="drag-drop-inside" style="margin:auto; text-align:center; width: 250px;">
					<p class="ngg-dragdrop-info drag-drop-info" style="font-size:20px;" >
					<?php 
            _e('Drop your files in this window', 'nggallery');
            ?>
<br/><span style="font-size:14px;"><?php 
            _e('Or', 'nggallery');
            ?>
</p>
                    <input style="margin:auto; text-align:center;" id="plupload-browse-button" type="button" value="<?php 
            esc_attr_e('Select Files', 'nggallery');
            ?>
" class="button" />
					</div>
					</div>
					</div>
                </td>
                <?php 
        } else {
            ?>
				<td><span id='spanButtonPlaceholder'></span>
				<input type="file" name="imagefiles[]" id="imagefiles" size="35" class="imagefiles" multiple/></td>
                <?php 
        }
        ?>
				</tr>
				<tr><td><div id='uploadQueue' style="margin-top: 10px;"><td></div>
            </tr>
			</table>
			<div class="submit">
				<?php 
        if ($ngg->options['swfUpload']) {
            ?>
				<input class="button action" type="submit" name="disable_flash" id="disable_flash" title="<?php 
            _e('Click here to use the browser upload instead', 'nggallery');
            ?>
" value="<?php 
            _e('Use basic uploader', 'nggallery');
            ?>
" />
				<?php 
        } else {
//.........这里部分代码省略.........
开发者ID:valerol,项目名称:korpus,代码行数:101,代码来源:addgallery.php

示例11: nggallery_admin_add_gallery


//.........这里部分代码省略.........
        _e('Upload a zip file with images', 'nggallery');
        ?>
</td> 
				</tr>
				<?php 
        if (function_exists('curl_init')) {
            ?>
				<tr valign="top"> 
					<th scope="row"><?php 
            _e('or enter a Zip-File URL', 'nggallery');
            ?>
:</th> 
					<td><input type="text" name="zipurl" id="zipurl" size="35" class="uploadform"/><br />
					<?php 
            _e('Import a zip file with images from a url', 'nggallery');
            ?>
</td> 
				</tr>
				<?php 
        }
        ?>
				<tr valign="top"> 
					<th scope="row"><?php 
        _e('in to', 'nggallery');
        ?>
</th> 
					<td><select name="zipgalselect">
					<option value="0" ><?php 
        _e('a new gallery', 'nggallery');
        ?>
</option>
					<?php 
        foreach ($gallerylist as $gallery) {
            if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
                continue;
            }
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . $name . '</option>' . "\n";
        }
        ?>
					</select>
					<br /><?php 
        echo $maxsize;
        ?>
					<br /><?php 
        echo _e('Note : The upload limit on your server is ', 'nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n";
        ?>
					<br /><?php 
        if (IS_WPMU && wpmu_enable_function('wpmuQuotaCheck')) {
            display_space_usage();
        }
        ?>
</td> 
				</tr> 
				</table>
				<div class="submit"><input class="button-primary" type="submit" name= "zipupload" value="<?php 
        _e('Start upload', 'nggallery');
        ?>
"/></div>
			</form>
		</div>
		<?php 
    }
    if (!IS_WPMU) {
        ?>
		<!-- import folder -->
开发者ID:alx,项目名称:SimplePress,代码行数:67,代码来源:addgallery.php


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