本文整理汇总了PHP中set_js_var函数的典型用法代码示例。如果您正苦于以下问题:PHP set_js_var函数的具体用法?PHP set_js_var怎么用?PHP set_js_var使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_js_var函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: imageflow_head
function imageflow_head()
{
global $IMAGEFLOWSET, $CONFIG, $CPG_PHP_SELF, $JS, $template_header;
require './plugins/imageflow/include/load_imageflowset.php';
$imageflow_pages_array = array('index.php');
if (in_array($CPG_PHP_SELF, $imageflow_pages_array) == TRUE) {
if ($IMAGEFLOWSET['imageflow_useenlarge']) {
$JS['includes'][] = "plugins/imageflow/js/imageflowenl.js";
} else {
$JS['includes'][] = "plugins/imageflow/js/imageflow.js";
}
set_js_var('cpgif_auto', $IMAGEFLOWSET['imageflow_auto']);
set_js_var('cpgif_autotime', $IMAGEFLOWSET['imageflow_autotime']);
set_js_var('cpgif_usewheel', $IMAGEFLOWSET['imageflow_usewheel']);
set_js_var('cpgif_usekeys', $IMAGEFLOWSET['imageflow_usekeys']);
$imageflow_headcode = '<link rel="stylesheet" title="Standard" href="plugins/imageflow/js/screen.css" type="text/css" media="screen" />';
$imageflow_headcode .= '<style type="text/css">';
$imageflow_headcode .= ' #imageflow{background-color:#' . $IMAGEFLOWSET['imageflow_bgcolor'] . ';width:' . $IMAGEFLOWSET['imageflow_width'] . ';}';
if ($IMAGEFLOWSET['imageflow_intable']) {
$imageflow_headcode .= ' #imgflowcontainer{margin-top:' . $IMAGEFLOWSET['imageflow_topcorrect'] . 'px;width:' . $IMAGEFLOWSET['imageflow_width'] . ';} ';
}
$imageflow_headcode .= ' #imgflowslider{background-image:url(\'plugins/imageflow/js/slider.gif\');}';
$imageflow_headcode .= '</style>';
$template_header = str_replace('{META}', '{META}' . $imageflow_headcode, $template_header);
}
}
开发者ID:phill104,项目名称:branches,代码行数:26,代码来源:codebase.php
示例2: slider_head
function slider_head()
{
global $SLIDERSET, $CONFIG, $CPG_PHP_SELF, $JS;
require './plugins/slider/include/load_sliderset.php';
// only insert stuff if we're on album list page
$slider_pages_array = array('index.php');
if (in_array($CPG_PHP_SELF, $slider_pages_array) == TRUE) {
$JS['includes'][] = "plugins/slider/slider.js";
set_js_var('slider_copyspeed', $SLIDERSET['slider_speed']);
set_js_var('slider_autow', $SLIDERSET['slider_autowidth']);
}
}
开发者ID:phill104,项目名称:branches,代码行数:12,代码来源:codebase.php
示例3: html5_display_upload_form
function html5_display_upload_form($upload_settings)
{
global $CONFIG, $USER_DATA, $lang_common, $lang_upload_php, $lang_plugin_html5upload, $icon_array, $h5a_upload, $lang_bbcode_help_title, $lang_bbcode_help;
list($upload_form, $upload_select) = $upload_settings;
if ($upload_form != 'html5_upload') {
return $upload_settings;
}
$plugpath = 'plugins/html5upload';
$grpn = USER_ID > 0 ? (int) $USER_DATA['group_id'] : 0;
$grpc = $grpn ? $grpn : '';
$cfg = isset($CONFIG['html5upload_config' . $grpc]) ? unserialize($CONFIG['html5upload_config' . $grpc]) : unserialize($CONFIG['html5upload_config']);
$maxfilesizebytes = $cfg['upldsize'] ? max($cfg['upldsize'], $h5a_upload->sys_max_upl_size) : $h5a_upload->sys_max_upl_size;
$maxfilesize = sprintf($lang_upload_php['max_fsize'], $h5a_upload->to_KMG($maxfilesizebytes));
list($timestamp, $form_token) = getFormToken(time() + 14400);
//allow up to 4 hours for upload to complete
set_js_var('timestamp', $timestamp - 14400);
//subtract those 4 hours so edits happen correctly
set_js_var('concurrent', $cfg['concurrent']);
set_js_var('autoedit', $cfg['autoedit']);
set_js_var('user_id', USER_ID);
set_js_var('guest_edit', $CONFIG['allow_guests_enter_file_details']);
set_js_var('H5uPath', "{$plugpath}/");
set_js_var('maxfilesize', $maxfilesizebytes);
set_js_var('maxchunksize', $h5a_upload->sys_max_chnk_size);
set_js_var('fup_payload', array('event' => 'picture', 'process' => 1, 'form_token' => $form_token, 'timestamp' => $timestamp, 'MFU' => 1));
set_js_var('h5uM', array('selAlb' => $lang_plugin_html5upload['albmSelMsg'], 'aborted' => $lang_plugin_html5upload['aborted'], 'type_err' => $lang_plugin_html5upload['type_err'], 'size_err' => $lang_plugin_html5upload['size_err'], 'extallow' => $lang_plugin_html5upload['extallow'], 'q_stop' => $lang_plugin_html5upload['q_stop'], 'q_go' => $lang_plugin_html5upload['q_resume'], 'q_can' => $lang_plugin_html5upload['q_cancel']));
$allowed_types = array_merge(explode('/', $CONFIG['allowed_img_types']), explode('/', $CONFIG['allowed_mov_types']), explode('/', $CONFIG['allowed_snd_types']), explode('/', $CONFIG['allowed_doc_types']));
set_js_var('allowed_file_types', $allowed_types);
// include the javascript upload engine (minified unless in debug mode)
$jsv = $CONFIG['debug_mode'] == 1 || $CONFIG['debug_mode'] == 2 && GALLERY_ADMIN_MODE ? '' : '.min';
js_include('plugins/html5upload/js/upload' . $jsv . '.js');
// add our style sheet
$h5up_meta = '<link rel="stylesheet" href="plugins/html5upload/css/upload.css" type="text/css" />';
pageheader($lang_plugin_html5upload['title'], $h5up_meta);
$upload_help = $h5a_upload->help_button('use');
$upload_table_header = <<<EOT
\t<table border="0" cellspacing="0" cellpadding="0" width="100%">
\t\t<tr>
\t\t\t<td>
\t\t\t\t{$icon_array['upload']}{$lang_plugin_html5upload['upldfiles']}{$upload_help}
\t\t\t</td>
\t\t\t<td style="text-align:right">
\t\t\t\t<span id="upload_method_selector">{$upload_select}</span>
\t\t\t</td>
\t\t</tr>
\t</table>
EOT;
starttable('100%', $upload_table_header, 2);
echo '<tr><td colspan="2" class="tableb tableb_alternate"><strong>' . $maxfilesize . '</strong></td></tr>';
form_alb_list_box($lang_common['album'], 'h5u_album');
echo <<<EOT
\t<tr id="navailrow" style="text-align:center;background-color:yellow;display:none">
\t\t<td colspan="2">{$lang_plugin_html5upload['notavail']}</td>
\t</tr>
\t<tr class="H5upV">
\t\t<td class="tableb" width="30%">{$lang_plugin_html5upload['flistitl']}</td>
\t\t<td class="tableb"><input type="checkbox" id="flistitl" onchange="shide_titlrow(this);" /></td>
\t</tr>
EOT;
if (USER_ID > 0 || $CONFIG['allow_guests_enter_file_details'] == 1) {
if ($cfg['enabtitl']) {
echo '<tr id="titlrow"><td class="tableb">' . $lang_upload_php['pic_title'] . '</td><td class="tableb"><input type="text" name="title" id="title" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabdesc']) {
$desclabl = $lang_upload_php['description'];
if ($CONFIG['show_bbcode_help']) {
$desclabl .= ' ' . cpg_display_help('f=empty.htm&base=64&h=' . urlencode(base64_encode(serialize($lang_bbcode_help_title))) . '&t=' . urlencode(base64_encode(serialize($lang_bbcode_help))), 470, 245);
}
echo '<tr><td class="tableb">' . $desclabl . '</td><td class="tableb"><textarea name="caption" rows="2" id="caption" class="textinput" style="width:90%" /></textarea></td></tr>';
}
if ($cfg['enabkeys']) {
$keywordLabel = sprintf($lang_common['keywords_insert1'], $lang_common['keyword_separators'][$CONFIG['keyword_separator']]) . '<br /><a href="keyword_select.php" class="greybox">' . $lang_common['keywords_insert2'] . '</a>';
echo '<tr><td class="tableb">' . $keywordLabel . '</td><td class="tableb"><input type="text" name="keywords" id="keywords" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabusr1'] && !empty($CONFIG['user_field1_name'])) {
echo '<tr><td class="tableb">' . $CONFIG['user_field1_name'] . '</td><td class="tableb"><input type="text" name="user1" id="user1" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabusr2'] && !empty($CONFIG['user_field2_name'])) {
echo '<tr><td class="tableb">' . $CONFIG['user_field2_name'] . '</td><td class="tableb"><input type="text" name="user2" id="user2" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabusr3'] && !empty($CONFIG['user_field3_name'])) {
echo '<tr><td class="tableb">' . $CONFIG['user_field3_name'] . '</td><td class="tableb"><input type="text" name="user3" id="user3" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabusr4'] && !empty($CONFIG['user_field4_name'])) {
echo '<tr><td class="tableb">' . $CONFIG['user_field4_name'] . '</td><td class="tableb"><input type="text" name="user4" id="user4" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
}
$acptmime = $cfg['acptmime'] ? "accept=\"{$cfg['acptmime']}\"" : '';
echo <<<EOT
\t<tr id="h5upldrow">
\t\t<td class="tableb">{$lang_plugin_html5upload['files']}</td>
\t\t<td class="tableb" style="padding:1em">
\t\t\t<div style="width:480px">
\t\t\t\t<input type="file" name="userpictures" id="upload_field" multiple="multiple" {$acptmime}/>
\t\t\t\t <br />
\t\t\t\t<div id="dropArea">{$lang_plugin_html5upload['drop_files']}</div>
\t\t\t\t <br />
\t\t\t\t<div id="progress_report" style="position:relative">
\t\t\t\t\t<div id="progress_report_name"></div>
\t\t\t\t\t<div id="progress_report_status" style="font-style: italic;"></div>
//.........这里部分代码省略.........
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:101,代码来源:codebase.php
示例4: theme_display_film_strip
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb', $date = '', $filmstrip_prev_pos, $filmstrip_next_pos, $max_block_items, $thumb_width)
{
global $CONFIG, $THEME_DIR;
global $template_film_strip, $lang_film_strip, $lang_common, $pic_count, $mar_pic;
$superCage = Inspekt::makeSuperCage();
static $template = '';
static $thumb_cell = '';
static $empty_cell = '';
static $spacer = '';
if (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
set_js_var('vertstrip', 1);
}
if (!$template) {
$template = $template_film_strip;
$thumb_cell = template_extract_block($template, 'thumb_cell');
$empty_cell = template_extract_block($template, 'empty_cell');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$date_link = $date == '' ? '' : '&date=' . $date;
if ($superCage->get->getInt('uid')) {
$uid_link = '&uid=' . $superCage->get->getInt('uid');
} else {
$uid_link = '';
}
$i = 0;
$thumb_strip = '';
foreach ($thumb_list as $thumb) {
$i++;
if ($mode == 'thumb') {
if ($thumb['pos'] == $pos && !$superCage->get->keyExists('film_strip')) {
$thumb['image'] = str_replace('class="image"', 'class="image middlethumb"', $thumb['image']);
}
// determine if thumbnail link targets should open in a pop-up
if ($CONFIG['thumbnail_to_fullsize'] == 1) {
// code for full-size pop-up
if (!USER_ID && $CONFIG['allow_unlogged_access'] <= 2) {
$target = 'javascript:;" onclick="alert(\'' . sprintf($lang_errors['login_needed'], '', '', '', '') . '\');';
} elseif (USER_ID && USER_ACCESS_LEVEL <= 2) {
$target = 'javascript:;" onclick="alert(\'' . sprintf($lang_errors['access_intermediate_only'], '', '', '', '') . '\');';
} else {
$target = 'javascript:;" onclick="MM_openBrWindow(\'displayimage.php?pid=' . $thumb['pid'] . '&fullsize=1\',\'' . uniqid(rand()) . '\',\'scrollbars=yes,toolbar=no,status=no,resizable=yes,width=' . ((int) $thumb['pwidth'] + (int) $CONFIG['fullsize_padding_x']) . ',height=' . ((int) $thumb['pheight'] + (int) $CONFIG['fullsize_padding_y']) . '\');';
}
} elseif ($aid == 'lastcom' || $aid == 'lastcomby') {
$page = cpg_get_comment_page_number($thumb['msg_id']);
$page = is_numeric($page) ? "&page={$page}" : '';
$target = "displayimage.php?album={$aid}{$cat_link}{$date_link}&pid={$thumb['pid']}{$uid_link}&msg_id={$thumb['msg_id']}{$page}#comment{$thumb['msg_id']}";
} else {
$target = "displayimage.php?album={$aid}{$cat_link}{$date_link}&pid={$thumb['pid']}{$uid_link}#top_display_media";
}
$params = array('{LINK_TGT}' => $target, '{THUMB}' => $thumb['image'], '{ONE_WIDTH}' => "width:" . $thumb_width . "px; float: left");
} else {
$params = array('{LINK_TGT}' => "index.php?cat={$thumb['cat']}", '{THUMB}' => $thumb['image'], '{ONE_WIDTH}' => "width:" . $thumb_width . "px; float: left");
}
$thumb_strip .= template_eval($thumb_cell, $params);
}
$tile1 = $THEME_DIR . 'images/tile1.gif';
$tile2 = $THEME_DIR . 'images/tile2.gif';
if (defined('THEME_HAS_NAVBAR_GRAPHICS')) {
$location = $THEME_DIR;
} else {
$location = '';
}
$max_itme_width_ul = $max_block_items;
if ($max_block_items % 2 == 0) {
$max_itme_width_ul = $max_block_items + 1;
}
$set_width_to_film = "width:" . $max_block_items * ($thumb_width + 4) . "px; position:relative;";
$params = array('{THUMB_STRIP}' => $thumb_strip, '{COLS}' => $i, '{TILE1}' => $tile1, '{TILE2}' => $tile2, '{SET_WIDTH}' => $set_width_to_film);
ob_start();
echo '<div id="filmstrip">';
if (!defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
starttable($CONFIG['picture_table_width']);
}
echo template_eval($template, $params);
if (!defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
endtable();
}
echo '</div>';
$film_strip = ob_get_contents();
ob_end_clean();
return $film_strip;
}
开发者ID:phill104,项目名称:branches,代码行数:82,代码来源:theme.php
示例5: annotate_file_data
function annotate_file_data($data)
{
global $CONFIG, $LINEBREAK, $lang_plugin_annotate, $annotate_icon_array, $REFERER;
// Disable for mobile devices
if ($CONFIG['plugin_annotate_disable_mobile'] && defined('MOBILE_VIEW')) {
return $data;
}
// Disable for non-image files
if (!is_image($data['filename'])) {
return $data;
}
// disable on 360° panoramas
if (function_exists(panorama_viewer_is_360_degree_panorama) && panorama_viewer_is_360_degree_panorama()) {
return $data;
}
// Logged in user can view annotations? (see check for guests some lines below)
if (USER_ID && annotate_get_level('permissions') == 0) {
return $data;
}
global $cpg_udb;
$notes = array();
$sql = "SELECT n.*, u." . $cpg_udb->field['username'] . " AS user_name FROM {$CONFIG['TABLE_PREFIX']}plugin_annotate n INNER JOIN " . $cpg_udb->usertable . " u ON n.user_id = u." . $cpg_udb->field['user_id'] . " WHERE n.pid = {$data['pid']} ORDER BY note ASC";
$result = cpg_db_query($sql);
while ($row = mysql_fetch_assoc($result)) {
//$row['note'] = addslashes($row['note']);
$notes[] = $row;
}
mysql_free_result($result);
$nr_notes = count($notes);
// Promote annotations to guests
if (!USER_ID && annotate_get_level('permissions') == 0) {
$result = cpg_db_query("SELECT MAX(value) FROM {$CONFIG['TABLE_CONFIG']} WHERE name LIKE 'plugin_annotate_permissions_%'");
$max_permission_level = mysql_result($result, 0);
mysql_free_result($result);
if ($max_permission_level >= 1 && $nr_notes > 0 && $CONFIG['allow_user_registration'] != 0) {
if ($nr_notes == 1) {
$data['footer'] .= $lang_plugin_annotate['1_annotation_for_file'] . '<br />' . $LINEBREAK;
} elseif ($nr_notes > 1) {
$data['footer'] .= sprintf($lang_plugin_annotate['x_annotations_for_file'], $nr_notes) . '<br />' . $LINEBREAK;
}
$data['footer'] .= sprintf($lang_plugin_annotate['registration_promotion'], '<a href="login.php?referer=' . $REFERER . '">', '</a>', '<a href="register.php?referer=' . $REFERER . '">', '</a>');
}
return $data;
}
set_js_var('pid', $data['pid']);
set_js_var('annotations', $notes);
// Determine if the user is allowed to have that button
if (annotate_get_level('permissions') >= 2) {
$menu_buttons = "";
// list existing annotations of the currently viewed album
$btns_person = "";
if (annotate_get_level('display_notes') == 1) {
$superCage = Inspekt::MakeSuperCage();
if ($superCage->get->testInt('album')) {
$result = cpg_db_query("\n SELECT DISTINCT note FROM {$CONFIG['TABLE_PREFIX']}plugin_annotate n\n INNER JOIN {$CONFIG['TABLE_PICTURES']} p\n ON p.pid = n.pid\n WHERE p.aid = " . $superCage->get->getInt('album') . "\n ORDER BY note\n ");
if (mysql_num_rows($result)) {
$btns_person .= "<div id=\"btns_person\" style=\"white-space:normal; cursor:default;\"> {$lang_plugin_annotate['rapid_annotation']}: ";
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$note = stripslashes($row[0]);
$btns_person .= "<button onclick=\"return addnote('{$row[0]}')\" class=\"admin_menu\" title=\"" . sprintf($lang_plugin_annotate['annotate_x_on_this_pic'], $note) . "\">{$note}</button> ";
}
$btns_person .= "</div><hr />";
$data['menu'] = $btns_person . $data['menu'];
}
mysql_free_result($result);
}
}
// free text
if ($CONFIG['plugin_annotate_type'] == 1 || $CONFIG['plugin_annotate_type'] == 3) {
$menu_buttons .= <<<EOT
<script type="text/javascript">
document.write('<li><a href="javascript:void();" title="{$lang_plugin_annotate['plugin_name']}" onclick="return addnote(\\'\\');" rel="nofollow">');
document.write('<span>{$annotate_icon_array['annotate']}{$lang_plugin_annotate['annotate']}</span>');
document.write('</a></li>');
</script>
EOT;
}
// list of annotions or user names
if ($CONFIG['plugin_annotate_type'] != 1) {
$select_box = '<select id="livesearch_output" size="1" class="button" style="margin-left: 12px;" onmousedown="load_annotation_list();" onmouseover="load_annotation_list();" onchange="return addnote(this.options[this.selectedIndex].value);"><option selected=\\"selected\\" disabled=\\"disabled\\">-- ' . $lang_plugin_annotate['annotate'] . ' --</option></select>';
$loading_replacement = '<span id="livesearch_output_loading" style="display: none; margin-right: 4px;"><img src="images/loader.gif" /></span>';
$livesearch_button = '<input id="livesearch_input" type="text" class="textinput" size="8" title="' . $lang_plugin_annotate['filter_annotations'] . '" style="cursor:help; padding-right: 16px; background-image: url(images/icons/search.png); background-repeat: no-repeat; background-position: right center;" />';
$menu_buttons .= <<<EOT
<script type="text/javascript">
document.write('<li>{$select_box}{$loading_replacement} {$livesearch_button}</li>');
</script>
EOT;
}
}
$html =& $data['html'];
$html = str_replace("<img ", "<img style=\"padding:0px\" ", $html);
if (function_exists(panorama_viewer_image)) {
$search = "/(<table.*style=\"table-layout:fixed.*<div style=\"overflow:auto.*>)(.*)(<\\/div><\\/td><\\/tr><\\/table>)/Uis";
preg_match($search, $html, $panorama_viewer_matches);
$html = preg_replace($search, "\\2", $html);
}
$container_width = $data['pwidth'];
if ($data['mode'] == 'normal') {
$imagesize = getimagesize($CONFIG['fullpath'] . $data['filepath'] . $CONFIG['normal_pfx'] . $data['filename']);
$container_width = $imagesize[0];
//.........这里部分代码省略.........
开发者ID:phill104,项目名称:branches,代码行数:101,代码来源:codebase.php
示例6: set_js_var
}
$withinSectionLoopCounter++;
$tabindexCounter++;
}
$admin_page .= <<<EOT
</table>
</div>
</td>
</tr>
EOT;
$sectionLoopCounter++;
}
// foreach-loop through the config sections
}
// "Regular" config page --- start
set_js_var('default_values_check', $js_default_values);
pageheader($lang_admin_php['title']);
echo $admin_page;
if ($superCage->get->keyExists('restore') != TRUE) {
echo <<<EOT
<tr>
<td align="left" class="tablef" colspan="2">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="33%">
<button type="button" class="button detail_expand_all" name="expandallbottom" id="expandallbottom" onclick="return false">
<img src="images/tree/plus.gif" width="9" height="9" border="0" alt="" title="{$lang_admin_php['expand_all']}" />
{$lang_admin_php['expand_all']}
</button>
<button type="button" class="button detail_collapse_all" name="collapseallbottom" id="collapseallbottom" style="display:none;" onclick="return false">
<img src="images/tree/minus.gif" width="9" height="9" border="0" alt="" title="{$lang_admin_php['collapse_all']}" />
开发者ID:stephenjschaefer,项目名称:APlusPhotography,代码行数:31,代码来源:admin.php
示例7: social_bookmarks_page_meta
function social_bookmarks_page_meta($var)
{
global $CONFIG, $JS, $lang_plugin_social_bookmarks, $LINEBREAK;
require_once './plugins/social_bookmarks/init.inc.php';
$var = '<link rel="stylesheet" href="plugins/social_bookmarks/style.css" type="text/css" />' . $LINEBREAK . $var;
if ($CONFIG['plugin_social_bookmarks_position'] == '2' || $CONFIG['plugin_social_bookmarks_position'] == '3') {
// define some vars that need to exist in JS
set_js_var('bookmarks_position', $CONFIG['plugin_social_bookmarks_position']);
set_js_var('bookmarks_visibility', $CONFIG['plugin_social_bookmarks_visibility']);
set_js_var('bookmarks_layout', $CONFIG['plugin_social_bookmarks_layout']);
set_js_var('bookmarks_greyout', $CONFIG['plugin_social_bookmarks_greyout']);
set_js_var('bookmarks_content', social_bookmarks_content());
}
return $var;
}
开发者ID:phill104,项目名称:branches,代码行数:15,代码来源:codebase.php
示例8: mysql_fetch_assoc
}
$ALBUM_DATA = mysql_fetch_assoc($results);
$CLEAN['album'] = $ALBUM_DATA['aid'];
} else {
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='{$CLEAN['album']}'");
if (!mysql_num_rows($results)) {
cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
}
$ALBUM_DATA = mysql_fetch_assoc($results);
}
$cat = $ALBUM_DATA['category'];
$actual_cat = $cat;
//////////// main code start ///////////////////
js_include('js/modifyalb.js');
set_js_var('reset_views_confirm', $lang_modifyalb_php['reset_views_confirm']);
set_js_var('cursor_stop', $icon_array['stop']);
pageheader(sprintf($lang_modifyalb_php['upd_alb_n'], $ALBUM_DATA['title']));
$album_lb = alb_list_box();
echo <<<EOT
<form method="post" name="modifyalbum" action="db_input.php">
<input type="hidden" name="event" value="album_update" />
<input type="hidden" name="aid" value="{$CLEAN['album']}" />
EOT;
starttable("100%", cpg_fetch_icon('modifyalb', 1) . $lang_common['album_properties'] . ' - ' . $lang_modifyalb_php['update'] . $help['table'], 2, 'cpg_zebra');
echo <<<EOT
<tr>
<td class="tableh2">
<strong>{$lang_modifyalb_php['related_tasks']}</strong>{$help['related_tasks']}
</td>
<td class="tableh2" align="center">
<a href="editpics.php?album={$CLEAN['album']}" class="admin_menu">{$icon_array['edit_files']}{$lang_modifyalb_php['edit_files']}</a>
开发者ID:stephenjschaefer,项目名称:APlusPhotography,代码行数:31,代码来源:modifyalb.php
示例9: cpg_db_query
}
if (!GALLERY_ADMIN_MODE && USER_ADMIN_MODE) {
if ($cat == 0) {
if (USER_CAN_CREATE_PRIVATE_ALBUMS) {
$cat = USER_ID + FIRST_USER_CAT;
} else {
// user is only allowed to create public albums - get first category the user is allowed to create albums in
$result = cpg_db_query("SELECT cm.cid FROM {$CONFIG['TABLE_CATMAP']} AS cm INNER JOIN {$CONFIG['TABLE_CATEGORIES']} AS c ON cm.cid = c.cid WHERE cm.group_id in (" . implode(",", $USER_DATA['groups']) . ") ORDER BY pos LIMIT 1");
$cat = $result->result(0, 0, true);
}
}
// only list the albums owned by the user
$user_id = USER_ID;
}
// set the cat value
set_js_var('category', $cat);
pageheader($lang_albmgr_php['title']);
echo <<<EOT
<form name="album_menu" id="cpg_form_album" method="post" action="delete.php?what=albmgr">
<input type="hidden" name="form_token" value="{$form_token}" />
<input type="hidden" name="timestamp" value="{$timestamp}" />
EOT;
starttable('100%', cpg_fetch_icon('alb_mgr', 2) . $lang_albmgr_php['title'] . ' ' . cpg_display_help('f=albums.htm&as=albmgr&ae=albmgr_end&top=1', '600', '400'), 1, '');
echo <<<EOT
<tr class="noscript">
<td class="tableh2">
<noscript>
{$lang_common['javascript_needed']}
</noscript>
</td>
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:31,代码来源:albmgr.php
示例10: set_js_var
$raw_ip = $superCage->server->testIp('REMOTE_ADDR') ? $superCage->server->getEscaped('REMOTE_ADDR') : '0.0.0.0';
if ($superCage->server->testIp('HTTP_CLIENT_IP')) {
$hdr_ip = $superCage->server->getEscaped('HTTP_CLIENT_IP');
} else {
if ($superCage->server->testIp('HTTP_X_FORWARDED_FOR')) {
$hdr_ip = $superCage->server->getEscaped('X_FORWARDED_FOR');
} else {
$hdr_ip = $raw_ip;
}
}
/*if (!preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $raw_ip)) $raw_ip = '0.0.0.0';
if (!preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $hdr_ip)) $hdr_ip = '0.0.0.0';*/
// Reference 'site_url' to 'ecards_more_pic_target'
$CONFIG['site_url'] =& $CONFIG['ecards_more_pic_target'];
// Set the site_url in js_vars so that it can be used in js
set_js_var('site_url', rtrim($CONFIG['site_url'], '/'));
// Set default language (set up by the admin) as a constant, since it might get replaced during runtime
define('DEFAULT_LANGUAGE', $CONFIG['lang']);
// Include logger functions
include_once 'include/logger.inc.php';
// Include media functions
require 'include/media.functions.inc.php';
// Check for GD GIF Create support
if ($CONFIG['thumb_method'] == 'im' || function_exists('imagecreatefromgif')) {
$CONFIG['GIF_support'] = 1;
} else {
$CONFIG['GIF_support'] = 0;
}
// Include plugin API
require 'include/plugin_api.inc.php';
if ($CONFIG['enable_plugins'] == 1) {
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:init.inc.php
示例11: cpg_db_query
$lang_meta_album_names['lastupby'] = $lang_meta_album_names['lastup'];
$lang_meta_album_names['lastcomby'] = $lang_meta_album_names['lastcom'];
if (isset($album) && is_numeric($album)) {
$result = cpg_db_query("SELECT category, title, aid, keyword, description, alb_password_hint FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = {$album}");
if ($result->numRows() > 0) {
$CURRENT_ALBUM_DATA = $result->fetchAssoc();
$actual_cat = $CURRENT_ALBUM_DATA['category'];
$CURRENT_ALBUM_KEYWORD = $CURRENT_ALBUM_DATA['keyword'];
breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text);
$cat = -$album;
}
$result->free();
if ($CONFIG['custom_sortorder_thumbs']) {
//show sort options only when not a meta album
$js_sort_vars = array('aid' => $album, 'page' => $page, 'sort_name' => $lang_thumb_view['name'], 'sort_title' => $lang_common['title'], 'sort_date' => $lang_thumb_view['date'], 'sort_position' => $lang_thumb_view['position'], 'sort_ta' => $lang_thumb_view['sort_ta'], 'sort_td' => $lang_thumb_view['sort_td'], 'sort_na' => $lang_thumb_view['sort_na'], 'sort_nd' => $lang_thumb_view['sort_nd'], 'sort_da' => $lang_thumb_view['sort_da'], 'sort_dd' => $lang_thumb_view['sort_dd'], 'sort_pa' => $lang_thumb_view['sort_pa'], 'sort_pd' => $lang_thumb_view['sort_pd']);
set_js_var('sort_vars', $js_sort_vars);
js_include('js/thumbnails.js');
}
// Meta albums, we need to restrict the albums to the current category
// except lastupby and lastcomby as CPG currently restricts these to the user's albums
} elseif (isset($cat) && $album != 'lastupby' && $album != 'lastcomby') {
if ($cat < 0) {
$result = cpg_db_query("SELECT category, title, aid, keyword, description, alb_password_hint FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = " . -$cat);
if ($result->numRows() > 0) {
$CURRENT_ALBUM_DATA = $result->fetchAssoc();
$actual_cat = $CURRENT_ALBUM_DATA['category'];
$CURRENT_ALBUM_KEYWORD = $CURRENT_ALBUM_DATA['keyword'];
}
$result->free();
get_meta_album_set($cat);
breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text);
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:31,代码来源:thumbnails.php
示例12: array
/**
* display_slideshow()
*
* gets data for thumbnails in an album for the film stript using Ajax call
*
* this added by Nuwan Sameera Hettiarachchi
*
* @param integer $album
* @param integer $cat
* @param integer $pos
**/
function &display_slideshow($pos, $ajax_show = 0)
{
global $CONFIG, $lang_display_image_php, $template_display_media, $lang_common, $album, $pid, $slideshow;
global $cat, $date;
print $Pid;
$Pic = array();
$Pid = array();
$Title = array();
$i = 0;
$j = 0;
$a = 0;
//$pid = (int)$_GET['pid'];
$start_img = '';
$pic_data = get_pic_data($album, $pic_count, $album_name, -1, -1, false);
foreach ($pic_data as $picture) {
if ($CONFIG['thumb_use'] == 'ht' && $picture['pheight'] > $CONFIG['picture_width']) {
// The wierd comparision is because only picture_width is stored
$condition = true;
} elseif ($CONFIG['thumb_use'] == 'wd' && $picture['pwidth'] > $CONFIG['picture_width']) {
$condition = true;
} elseif ($CONFIG['thumb_use'] == 'any' && max($picture['pwidth'], $picture['pheight']) > $CONFIG['picture_width']) {
$condition = true;
//thumb cropping
} elseif ($CONFIG['thumb_use'] == 'ex' && max($picture['pwidth'], $picture['pheight']) > $CONFIG['picture_width']) {
$condition = true;
} else {
$condition = false;
}
if (is_image($picture['filename'])) {
if ($CONFIG['make_intermediate'] && $condition) {
$picture_url = get_pic_url($picture, 'normal');
} else {
$picture_url = get_pic_url($picture, 'fullsize');
}
if ($picture['title']) {
$Title_get = $picture['title'];
} else {
$Title_get = $picture['filename'];
}
$Pic[$i] = htmlspecialchars($picture_url, ENT_QUOTES);
$Pid[$i] = $picture['pid'];
$Title[$i] = $Title_get;
if ($picture['pid'] == $pid) {
$j = $i;
$start_img = $picture_url;
}
$i++;
}
}
$Pic_length = count($Pic);
set_js_var('Time', $slideshow);
set_js_var('Pic_count', $Pic_length);
set_js_var('Pid', $pid);
if (!$i) {
echo "Pic[0] = 'images/thumb_document.jpg'\n";
}
if ($ajax_show == 0) {
theme_slideshow($Pic[$pos], $Title[$pos]);
}
$a = array('url' => $Pic[$pos], 'title' => $Title[$pos], 'pid' => $Pid[$pos]);
$a_jons = json_encode($a);
if ($ajax_show == 1) {
echo $a_jons;
}
}
开发者ID:phill104,项目名称:branches,代码行数:76,代码来源:functions.inc.php
示例13: set_js_var
$select .= "</optgroup>\n";
}
$select .= '<optgroup label="' . $val['cat'] . '">' . "\n";
$alb_cat = $val['cat'];
}
$select .= '<option value="' . $val['aid'] . '"' . ($val['aid'] == $aid ? ' selected="selected"' : '') . '> ' . $val['title'] . "</option>\n";
}
if ($alb_cat) {
$select .= "</optgroup>\n";
}
}
return "\n<select name=\"{$id}\" class=\"listbox\" >\n{$select}</select>\n";
}
/**set js variable to changes albums*/
$change_album = $lang_picmgr_php['change_album'];
set_js_var('change_album', $change_album);
pageheader($lang_picmgr_php['pic_mgr']);
?>
<form name="picture_menu" id="cpgformPic" method="post" action="delete.php?what=picmgr" >
<?php
starttable("100%", $lang_picmgr_php['pic_mgr'], 1);
?>
<noscript>
<tr>
<td colspan="2" class="tableh2">
<?php
echo $lang_common['javascript_needed'];
?>
</td>
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:picmgr.php
示例14: lightbox_notes_for_net_header
function lightbox_notes_for_net_header($html)
{
global $CONFIG, $JS, $THEME_DIR, $lang_plugin_lightbox_notes_for_net, $template_header, $USER;
require_once './plugins/lightbox_notes_for_net/init.inc.php';
if (in_array('plugins/lightbox_notes_for_net/script.js', $JS['includes']) != TRUE) {
$JS['includes'][] = 'plugins/lightbox_notes_for_net/script.js';
}
set_js_var('plugin_lightbox_nfn_border', $CONFIG['plugin_lightbox_nfn_border']);
set_js_var('plugin_lightbox_nfn_sizespeed', $CONFIG['plugin_lightbox_nfn_sizespeed']);
set_js_var('plugin_lightbox_nfn_slidetime', $CONFIG['plugin_lightbox_nfn_slidetime']);
set_js_var('plugin_lightbox_nfn_imagefade', $CONFIG['plugin_lightbox_nfn_imagefade']);
set_js_var('plugin_lightbox_nfn_containerfade', $CONFIG['plugin_lightbox_nfn_containerfade']);
set_js_var('plugin_lightbox_nfn_notimer', $CONFIG['plugin_lightbox_nfn_notimer']);
set_js_var('plugin_lightbox_nfn_image_exit', $CONFIG['plugin_lightbox_nfn_image_exit']);
set_js_var('plugin_lightbox_nfn_nocorner', $CONFIG['plugin_lightbox_nfn_nocorner']);
set_js_var('plugin_lightbox_nfn_fade_swap', $CONFIG['plugin_lightbox_nfn_fade_swap']);
set_js_var('plugin_lightbox_nfn_resize', $CONFIG['plugin_lightbox_nfn_resize']);
if ($CONFIG['plugin_lightbox_nfn_buttonset'] == '1') {
set_js_var('plugin_lightbox_nfn_image_loading', 'plugins/lightbox_notes_for_net/images/loading.gif');
set_js_var('plugin_lightbox_nfn_image_btnprev', 'plugins/lightbox_notes_for_net/images/prev.png');
set_js_var('plugin_lightbox_nfn_image_btnnext', 'plugins/lightbox_notes_for_net/images/next.png');
set_js_var('plugin_lightbox_nfn_image_btnclose', 'plugins/lightbox_notes_for_net/images/close.png');
set_js_var('plugin_lightbox_nfn_image_btnbottomprev', 'plugins/lightbox_notes_for_net/images/back_bot.png');
set_js_var('plugin_lightbox_nfn_image_btnbottomnext', 'plugins/lightbox_notes_for_net/images/start.png');
set_js_var('plugin_lightbox_nfn_image_btnplay', 'plugins/lightbox_notes_for_net/images/start.png');
set_js_var('plugin_lightbox_nfn_image_btnstop', 'plugins/lightbox_notes_for_net/images/pause.png');
} else {
if (defined('THEME_HAS_NAVBAR_GRAPHICS')) {
$theme_navbar_folder = $THEME_DIR;
} else {
$theme_navbar_folder = '';
}
if (defined('THEME_HAS_PROGRESS_GRAPHICS')) {
$theme_image_folder = $THEME_DIR;
} else {
$theme_image_folder = '';
}
set_js_var('plugin_lightbox_nfn_image_loading', $theme_image_folder . 'images/loader.gif');
set_js_var('plugin_lightbox_nfn_image_btnprev', $theme_navbar_folder . 'images/icons/left.png');
set_js_var('plugin_lightbox_nfn_image_btnnext', $theme_navbar_folder . 'images/icons/right.png');
set_js_var('plugin_lightbox_nfn_image_btnclose', $theme_navbar_folder . 'images/icons/close.png');
set_js_var('plugin_lightbox_nfn_image_btnbottomprev', $theme_navbar_folder . 'images/icons/left.png');
set_js_var('plugin_lightbox_nfn_image_btnbottomnext', $theme_navbar_folder . 'images/icons/right.png');
set_js_var('plugin_lightbox_nfn_image_btnplay', $theme_navbar_folder . 'images/icons/slideshow.png');
set_js_var('plugin_lightbox_nfn_image_btnstop', $theme_navbar_folder . 'images/icons/cancel.png');
}
set_js_var('lang_lightbox_nfn_image', $lang_plugin_lightbox_notes_for_net['image']);
set_js_var('lang_lightbox_nfn_of', $lang_plugin_lightbox_notes_for_net['of']);
set_js_var('lang_lightbox_nfn_previous', $lang_plugin_lightbox_notes_for_net['previous']);
set_js_var('lang_lightbox_nfn_next', $lang_plugin_lightbox_notes_for_net['next']);
set_js_var('lang_lightbox_nfn_close', $lang_plugin_lightbox_notes_for_net['close']);
set_js_var('lang_lightbox_nfn_start_slideshow', $lang_plugin_lightbox_notes_for_net['start_slideshow']);
set_js_var('lang_lightbox_nfn_pause_slideshow', $lang_plugin_lightbox_notes_for_net['pause_slideshow']);
set_js_var('lang_lightbox_nfn_downloadtext', $lang_plugin_lightbox_notes_for_net['download_text']);
set_js_var('lang_lightbox_nfn_downloadtitle', $lang_plugin_lightbox_notes_for_net['download_title']);
$border = $CONFIG['plugin_lightbox_nfn_border'];
$lightbox_meta = <<<EOT
<link rel="stylesheet" href="plugins/lightbox_notes_for_net/style.css" type="text/css" media="screen" />
<style type="text/css"> #lightbox-container-image {height: 100%; padding: {$border}px;} </style>
EOT;
return $lightbox_meta . $html;
}
开发者ID:phill104,项目名称:branches,代码行数:62,代码来源:codebase.php
示例15: sprintf
$redirector = '';
$countdown = '';
} else {
$redirector = '<meta http-equiv="refresh" content="' . $CONFIG['plugin_newsletter_page_refresh_delay'] . '; URL=index.php?file=newsletter/send&time=' . $timestamp_start . '&counter=' . $processed_records_counter . '" />';
$countdown = <<<EOT
<tr>
<td class="tableb tableb_alternate">
EOT;
$countdown .= sprintf($lang_plugin_newsletter['page_will_refresh_in_x'], '<span id="countdown"></span>');
$countdown .= <<<EOT
</td>
</tr>
EOT;
set_js_var('page_refresh_delay', $CONFIG['plugin_newsletter_page_refresh_delay']);
set_js_var('reloading', strtoupper($lang_plugin_newsletter['reloading']));
set_js_var('reload_url', 'index.php?file=newsletter/send&time=' . $timestamp_start . '&counter=' . $processed_records_counter);
if (in_array('plugins/newsletter/js/jquery.countdown.js', $JS['includes']) != TRUE) {
$JS['includes'][] = 'plugins/newsletter/js/jquery.countdown.js';
}
}
pageheader($lang_plugin_newsletter['send_mailings'], $redirector);
if ($CONFIG['plugin_newsletter_mails_per_page'] == '1') {
$mails_per_page = $lang_plugin_newsletter['one_email'];
} else {
$mails_per_page = sprintf($lang_plugin_newsletter['x_emails'], $CONFIG['plugin_newsletter_mails_per_page']);
}
if ($CONFIG['plugin_newsletter_page_refresh_delay'] == '1') {
$page_refresh_delay = $lang_plugin_newsletter['second'];
} elseif ($CONFIG['plugin_newsletter_page_refresh_delay'] == '60') {
$page_refresh_delay = $lang_plugin_newsletter['minute'];
} elseif ($CONFIG['plugin_newsletter_page_refresh_delay'] > '60' && $CONFIG['plugin_newsletter_page_refresh_delay'] / 60 == floor($CONFIG['plugin_newsletter_page_refresh_delay'] / 6
|
请发表评论