本文整理汇总了PHP中gallery_bank_pics函数的典型用法代码示例。如果您正苦于以下问题:PHP gallery_bank_pics函数的具体用法?PHP gallery_bank_pics怎么用?PHP gallery_bank_pics使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gallery_bank_pics函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: gallery_bank_pics
?>
"><?php
echo $i;
?>
</option>
<?php
}
?>
</select>
</li>
</ul>
</div>
<div id="sort_album" class="sort">
<?php
for ($flag = 0; $flag < count($album); $flag++) {
$albumCover = $wpdb->get_row($wpdb->prepare("SELECT album_cover,thumbnail_url,video FROM " . gallery_bank_pics() . " WHERE album_cover=1 and album_id = %d", $album[$flag]->album_id));
?>
<div id="sortOrder_<?php
echo $album[$flag]->album_id;
?>
"
class="imgLiquidFill dynamic_cover_css">
<?php
if (count($albumCover) != 0) {
if ($albumCover->album_cover == 0) {
?>
<img id="albumOrder_<?php
echo $album[$flag]->album_id;
?>
"
src="<?php
开发者ID:kivivuori,项目名称:jotain,代码行数:31,代码来源:album-sorting.php
示例2: gallery_bank_albums
<?php
global $wpdb;
$sql = "TRUNCATE TABLE " . gallery_bank_albums();
$wpdb->query($sql);
$sql = "TRUNCATE TABLE " . gallery_bank_pics();
$wpdb->query($sql);
include_once GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php";
开发者ID:kivivuori,项目名称:jotain,代码行数:8,代码来源:restore_factory_settings.php
示例3: gallery_bank_pics
}
} else {
$wpdb->query($wpdb->prepare("UPDATE " . gallery_bank_pics() . " SET title = %s, description = %s, date = CURDATE(), tags = %s, album_cover = %d WHERE pic_id = %d", $field[4], $field[5], $field[6], 0, $field[1]));
}
}
die;
} else {
if ($_REQUEST["param"] == "delete_pic") {
$delete_array = html_entity_decode($_REQUEST["delete_array"]);
$albumId = intval($_REQUEST["albumid"]);
$wpdb->query("DELETE FROM " . gallery_bank_pics() . " WHERE pic_id in ({$delete_array})");
die;
} else {
if ($_REQUEST["param"] == "Delete_album") {
$album_id = intval($_REQUEST["album_id"]);
$wpdb->query($wpdb->prepare("DELETE FROM " . gallery_bank_pics() . " WHERE album_id = %d", $album_id));
$wpdb->query($wpdb->prepare("DELETE FROM " . gallery_bank_albums() . " WHERE album_id = %d", $album_id));
die;
} else {
if ($_REQUEST["param"] == "update_option") {
update_option("gallery-bank-info-popup", "no");
die;
}
}
}
}
}
}
}
}
}
开发者ID:AdamFreemer,项目名称:xfx-site,代码行数:31,代码来源:add-new-album-class.php
示例4: foreach
$listingCounter = 1;
foreach ($updateRecordsArray as $recordIDValue) {
$wpdb->query($wpdb->prepare("UPDATE " . gallery_bank_albums() . " SET album_order = %d WHERE album_id = %d", $listingCounter, $recordIDValue));
$listingCounter = $listingCounter + 1;
}
die;
} elseif ($_REQUEST["param"] == "delete_all_albums") {
$album = $wpdb->get_results("SELECT * FROM " . gallery_bank_albums());
for ($flag = 0; $flag < count($album); $flag++) {
$wpdb->query($wpdb->prepare("DELETE FROM " . gallery_bank_pics() . " WHERE album_id = %d", $album[$flag]->album_id));
$wpdb->query($wpdb->prepare("DELETE FROM " . gallery_bank_albums() . " WHERE album_id = %d", $album[$flag]->album_id));
}
die;
} elseif ($_REQUEST["param"] == "purge_all_images") {
$pics = $wpdb->get_col("SELECT thumbnail_url FROM " . gallery_bank_pics());
$album_cover = $wpdb->get_col($wpdb->prepare("SELECT thumbnail_url FROM " . gallery_bank_pics() . " WHERE album_cover = %d ", 1));
$purged_images = array();
$images = array();
if (is_dir(GALLERY_MAIN_UPLOAD_DIR)) {
if ($dir = opendir(GALLERY_MAIN_UPLOAD_DIR)) {
$uploaded_images = array();
while (($file = readdir($dir)) !== false) {
if (!is_dir(GALLERY_MAIN_UPLOAD_DIR . $file)) {
$uploaded_images[] = $file;
}
}
closedir($dir);
}
}
$images = array_diff($uploaded_images, $pics);
foreach ($images as $File) {
开发者ID:kivivuori,项目名称:jotain,代码行数:31,代码来源:add-new-album-class.php
示例5: json_decode
if (!current_user_can($user_role_permission)) {
return;
} else {
if (isset($_REQUEST["param"])) {
if ($_REQUEST["param"] == "update_global_settings") {
$settings_array = json_decode(stripcslashes(html_entity_decode($_REQUEST["settings_array"])));
$thumb_width = intval($_REQUEST["thumb_width"]);
$thumb_height = intval($_REQUEST["thumb_height"]);
$cover_width = intval($_REQUEST["cover_width"]);
$cover_height = intval($_REQUEST["cover_height"]);
foreach ($settings_array as $val => $innerKey) {
$wpdb->query($wpdb->prepare("UPDATE " . gallery_bank_settings() . " SET setting_value = %s WHERE setting_key = %s", (string) current($innerKey), key($innerKey)));
}
////////////CODE FOR CREATING THUMBNAILS///////////
$album_pics = $wpdb->get_results("SELECT * FROM " . gallery_bank_pics() . " order by sorting_order asc");
$album_covers = $wpdb->get_results("SELECT * FROM " . gallery_bank_pics() . " where album_cover = 1 order by sorting_order asc");
for ($flag = 0; $flag < count($album_pics); $flag++) {
if ($album_pics[$flag]->video != 1) {
process_image_upload($album_pics[$flag]->thumbnail_url, $thumb_width, $thumb_height);
}
}
for ($flag1 = 0; $flag1 < count($album_covers); $flag1++) {
if ($album_covers[$flag1]->thumbnail_url != "") {
process_album_upload($album_covers[$flag1]->thumbnail_url, $cover_width, $cover_height);
}
}
die;
} else {
if ($_REQUEST["param"] == "restore_settings") {
$sql = "TRUNCATE TABLE " . gallery_bank_settings();
$wpdb->query($sql);
开发者ID:kivivuori,项目名称:jotain,代码行数:31,代码来源:gallery-bank-settings-class.php
示例6: create_table_album_pics
function create_table_album_pics()
{
$sql = "CREATE TABLE " . gallery_bank_pics() . "(\r\n pic_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n album_id INTEGER(10) UNSIGNED NOT NULL,\r\n title TEXT,\r\n description TEXT,\r\n thumbnail_url TEXT NOT NULL,\r\n sorting_order INTEGER(20),\r\n date DATE,\r\n url VARCHAR(250),\r\n video INTEGER(10) NOT NULL,\r\n tags TEXT,\r\n pic_name TEXT NOT NULL,\r\n album_cover INTEGER(1) NOT NULL,\r\n PRIMARY KEY(pic_id)\r\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
dbDelta($sql);
}
开发者ID:BigBoss424,项目名称:boyer,代码行数:5,代码来源:install-script.php
示例7: gallery_bank_pics
break;
case "title":
$pics_order = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . gallery_bank_pics() . " WHERE album_id = %d order by title asc", $album_id));
break;
case "date":
$pics_order = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . gallery_bank_pics() . " WHERE album_id = %d order by date asc", $album_id));
break;
case "asc":
$pics_order = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . gallery_bank_pics() . " WHERE album_id = %d order by pic_id asc", $album_id));
break;
case "desc":
$pics_order = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . gallery_bank_pics() . " WHERE album_id = %d order by pic_id desc", $album_id));
break;
}
} else {
$pics_order = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . gallery_bank_pics() . " WHERE album_id = %d order by sorting_order asc", $album_id));
}
$album = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . gallery_bank_albums() . " where album_id = %d", $album_id));
$album_css = $wpdb->get_results("SELECT * FROM " . gallery_bank_settings());
if (count($album_css) != 0) {
$setting_keys = array();
for ($flag = 0; $flag < count($album_css); $flag++) {
array_push($setting_keys, $album_css[$flag]->setting_key);
}
$index = array_search("thumbnails_width", $setting_keys);
$thumbnails_width = $album_css[$index]->setting_value;
$index = array_search("thumbnails_height", $setting_keys);
$thumbnails_height = $album_css[$index]->setting_value;
$index = array_search("thumbnails_opacity", $setting_keys);
$thumbnails_opacity = $album_css[$index]->setting_value;
$index = array_search("thumbnails_border_size", $setting_keys);
开发者ID:kivivuori,项目名称:jotain,代码行数:31,代码来源:images-sorting.php
示例8: gallery_bank_albums
<?php
global $wpdb, $current_user;
if (!is_user_logged_in()) {
return;
}
$sql = "DROP TABLE " . gallery_bank_albums();
$wpdb->query($sql);
$sql = "DROP TABLE " . gallery_bank_pics();
$wpdb->query($sql);
$sql = "DROP TABLE " . gallery_bank_settings();
$wpdb->query($sql);
$sql = "DROP TABLE " . gallery_bank_licensing();
$wpdb->query($sql);
delete_option("gallery-bank-pro-edition");
delete_option("gallery-bank-updation-check-url");
delete_option("gallery-bank-activation");
delete_option("allow_tracking_gb");
开发者ID:shellygraham,项目名称:livestock-framing,代码行数:18,代码来源:uninstall-script.php
注:本文中的gallery_bank_pics函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论