function album_share_codes_main() { $superCage = Inspekt::makeSuperCage(); if ($superCage->get->testInt('album')) { global $CONFIG; $aid = $superCage->get->getInt('album'); $result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '{$aid}'"); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { $url = $CONFIG['ecards_more_pic_target'] . 'displayimage.php?pid=' . $row['pid']; $thumb = $CONFIG['ecards_more_pic_target'] . get_pic_url($row, 'thumb'); $content1 .= '[url=' . $url . '][img]' . $thumb . '[/img][/url]' . "\n"; $content2 .= '<a href="' . $url . '"><img src="' . $thumb . ' /></a>' . "\n"; } starttable(-1, 'Share codes for <i>all files</i> in this album'); echo <<<EOT <tr> <td class="tableb"> <tt>[url][img][/url]</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content1}</textarea> <br /> <tt><a><img></a></tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content2}</textarea> </td> </tr> EOT; endtable(); } } }
global $db; if (!USER_ID) { cpg_die(_ERROR, ACCESS_DENIED); } //, __FILE__, __LINE__ $sql = "SELECT username, user_email, user_regdate as user_regdate_cp, group_name, " . "user_from, user_interests, user_website, user_occ, " . "COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_quota " . "FROM {$CONFIG['TABLE_USERS']} AS u " . "INNER JOIN {$CONFIG['TABLE_USERGROUPS']} AS g ON user_group_cp = group_id " . "LEFT JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " . "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = a.aid " . "WHERE user_id ='" . USER_ID . "' " . "GROUP BY user_id, username, user_email, user_regdate, group_name, user_from, user_interests, user_website, user_occ, group_quota"; $result = $db->sql_query($sql); if (!$db->sql_numrows($result)) { cpg_die(_ERROR, $lang_register_php['err_unk_user'], __FILE__, __LINE__); } $user_data = $db->sql_fetchrow($result); $db->sql_freeresult($result); $form_data = array('username' => $user_data['username'], 'reg_date' => localised_date($user_data['user_regdate_cp'], REGISTER_DATE_FMT), 'group' => $user_data['group_name'], 'email' => $user_data['user_email'], 'disk_usage' => $user_data['disk_usage'] ? $user_data['disk_usage'] : 0 . ($user_data['group_quota'] ? '/' . $user_data['group_quota'] : '') . ' ' . $lang_byte_units[1], 'location' => $user_data['user_from'], 'interests' => $user_data['user_interests'], 'website' => $user_data['user_website'], 'occupation' => $user_data['user_occ']); $title = sprintf(X_S_PROFILE, CPG_USERNAME); pageheader($title); starttable(-1, $title, 2); $chset = _CHARSET; echo '<form method="post" action="' . URL::index("") . '" enctype="multipart/form-data" accept-charset="$chset">'; make_form($edit_profile_form_param, $form_data); echo <<<EOT </form> EOT; endtable(); if (defined('CPG_NUKE')) { get_lang("Your_Account"); require_once 'modules/Your_Account/functions.php'; require "modules/Your_Account/userinfo.php"; userinfo(USER_ID); } else {
function edit_user($user_id) { global $CONFIG, $CPG_PHP_SELF, $LINEBREAK; //, $PHP_SELF; global $lang_usermgr_php, $lang_common, $icon_array, $op; $form_data = array(array('input', 'user_name', cpg_fetch_icon('my_profile', 2) . $lang_usermgr_php['name'], 25), array('password', 'user_password', cpg_fetch_icon('key_enter', 2) . $lang_usermgr_php['password'], 25), array('yesno', 'user_active', cpg_fetch_icon('online', 2) . $lang_usermgr_php['user_active']), array('group_list', 'user_group', cpg_fetch_icon('groups_mgr', 2) . $lang_usermgr_php['user_group']), array('input', 'user_email', cpg_fetch_icon('mail', 2) . $lang_usermgr_php['user_email'], 255)); if ($CONFIG['user_profile1_name'] != '') { $form_data[] = array('input', 'user_profile1', cpg_fetch_icon('blank', 2) . $CONFIG['user_profile1_name'], 255); } if ($CONFIG['user_profile2_name'] != '') { $form_data[] = array('input', 'user_profile2', cpg_fetch_icon('blank', 2) . $CONFIG['user_profile2_name'], 255); } if ($CONFIG['user_profile3_name'] != '') { $form_data[] = array('input', 'user_profile3', cpg_fetch_icon('blank', 2) . $CONFIG['user_profile3_name'], 255); } if ($CONFIG['user_profile4_name'] != '') { $form_data[] = array('input', 'user_profile4', cpg_fetch_icon('blank', 2) . $CONFIG['user_profile4_name'], 255); } if ($CONFIG['user_profile5_name'] != '') { $form_data[] = array('input', 'user_profile5', cpg_fetch_icon('blank', 2) . $CONFIG['user_profile5_name'], 255); } if ($CONFIG['user_profile6_name'] != '') { $form_data[] = array('textarea', 'user_profile6', cpg_fetch_icon('blank', 2) . $CONFIG['user_profile6_name'], 255); } //$form_data = CPGPluginAPI::filter('usermgr_form_list', array(0 => $form_data, 1 => $user_id); list($timestamp, $form_token) = getFormToken(); if ($user_id != 'new_user') { $sql = "SELECT * FROM {$CONFIG['TABLE_USERS']} WHERE user_id = '{$user_id}'"; $result = cpg_db_query($sql); if (!mysql_num_rows($result)) { cpg_die(CRITICAL_ERROR, $lang_usermgr_php['err_unknown_user'], __FILE__, __LINE__); } $user_data = mysql_fetch_array($result); mysql_free_result($result); if (mysql_num_rows(cpg_db_query("SELECT user_name FROM {$CONFIG['TABLE_BANNED']} WHERE user_name = '" . addslashes($user_data['user_name']) . "' AND brute_force=0 LIMIT 1"))) { $user_status = $lang_usermgr_php['user_is_banned']; } elseif ($user_data['user_active'] == 'YES') { $user_status = $lang_usermgr_php['status_active']; } else { $user_status = $lang_usermgr_php['status_inactive']; } } else { // If this is a new user then add a checkbox for 'send login data to user' option $form_data[] = array('checkbox', 'send_login_data', $lang_usermgr_php['send_login_data']); $user_data = array('user_name' => '', 'user_active' => '', 'user_group' => '', 'user_group_list' => '', 'user_email' => '', 'user_profile1' => '', 'user_profile2' => '', 'user_profile3' => '', 'user_profile4' => '', 'user_profile6' => ''); } $status_icon = cpg_fetch_icon('online', 2); echo <<<EOT <form name="cpgform3" id="cpgform3" method="post" action="{$CPG_PHP_SELF}?op=update&user_id={$user_id}"> EOT; if ($op == 'new_user') { starttable(500, $icon_array['add_user'] . $lang_usermgr_php['create_new_user'], 2); } else { starttable(500, $icon_array['edit'] . $lang_usermgr_php['modify_user'], 2); echo <<<EOT <tr> <td class="tableb"> {$status_icon}{$lang_usermgr_php['status']} </td> <td class="tableb"> {$user_status} </td> </tr> EOT; } $loopCounter = 0; foreach ($form_data as $element) { if ($loopCounter / 2 == floor($loopCounter / 2)) { $row_style_class = 'tableb tableb_alternate'; } else { $row_style_class = 'tableb'; } $loopCounter++; switch ($element[0]) { case 'input': $value = $user_data[$element[1]]; if ($element[2]) { echo <<<EOT <tr> <td width="40%" class="{$row_style_class}" valign="top"> {$element[2]} </td> <td width="60%" class="{$row_style_class}" valign="top"> <input type="text" style="width: 100%" name="{$element[1]}" maxlength="{$element[3]}" value="{$value}" class="textinput" /> </td> </tr> EOT; } break; case 'textarea': $value = $user_data[$element[1]]; if ($element[2]) { echo <<<EOT <tr> <td width="40%" class="{$row_style_class}" height="25" valign="top"> {$element[2]} </td> <td width="60%" class="{$row_style_class}" valign="top"> <textarea name="{$element[1]}" rows="7" cols="40" class="textinput" style="width: 100%">{$value}</textarea> </td> </tr> EOT; } break; case 'password': echo <<<EOT <tr> <td width="40%" class="{$row_style_class}" valign="top"> {$element[2]} </td> <td width="60%" class="{$row_style_class}" valign="top"> <input type="password" style="width: 100%" name="{$element[1]}" maxlength="{$element[3]}" value="" class="textinput" /> </td> </tr> EOT; break; case 'yesno': $value = $user_data[$element[1]]; $yes_selected = $value == 'YES' || $op == 'new_user' ? 'checked="checked"' : ''; $no_selected = $value == 'NO' ? 'checked="checked"' : ''; echo <<<EOT <tr> <td class="{$row_style_class}" valign="top"> {$element[2]} </td> <td class="{$row_style_class}" valign="top"> <input type="radio" id="yes" name="{$element[1]}" value="YES" {$yes_selected} /><label for="yes" class="clickable_option">{$lang_common['yes']}</label> <input type="radio" id="no" name="{$element[1]}" value="NO" {$no_selected} /><label for="no" class="clickable_option">{$lang_common['no']}</label> </td> </tr> EOT; break; case 'group_list': $sql = "SELECT group_id, group_name FROM {$CONFIG['TABLE_USERGROUPS']} ORDER BY group_name"; $result = cpg_db_query($sql); $group_list = cpg_db_fetch_rowset($result); mysql_free_result($result); $sel_group = $user_data[$element[1]]; $user_group_list = $user_data['user_group_list'] == '' ? ',' . $sel_group . ',' : ',' . $user_data['user_group_list'] . ',' . $sel_group . ','; echo <<<EOT <tr> <td class="{$row_style_class}" valign="top"> {$element[2]} </td> <td class="{$row_style_class}" valign="top"> <select name="{$element[1]}" class="listbox"> EOT; $group_cb = ''; foreach ($group_list as $group) { echo ' <option value="' . $group['group_id'] . '"' . ($group['group_id'] == $sel_group || $op == 'new_user' && $group['group_id'] == 2 ? ' selected="selected"' : '') . '>' . $group['group_name'] . '</option>' . $LINEBREAK; if ($group['group_id'] != 3) { $checked = strpos(' ' . $user_group_list, ',' . $group['group_id'] . ',') ? 'checked="checked"' : ''; $group_cb .= '<input name="group_list[]" type="checkbox" value="' . $group['group_id'] . '" ' . $checked . ' />' . $group['group_name'] . '<br />' . $LINEBREAK; } } $assignedGroupsHelp = cpg_display_help('f=users.htm&as=user_cp_edit_permission_by_group&ae=user_cp_edit_permission_by_group_end', '450', '300'); echo <<<EOT </select><br /> {$group_cb} <br /> <a href="usermgr.php?op=groups_alb_access&form_token={$form_token}&timestamp={$timestamp}" class="admin_menu">{$lang_usermgr_php['groups_alb_access']}</a> {$assignedGroupsHelp} </td> </tr> EOT; break; case 'checkbox': echo <<<EOT <tr> <td class="{$row_style_class}" valign="top"> <label for="send_login_data">{$element[2]}</label> </td> <td class="{$row_style_class} valign="top""> <input type="checkbox" id="send_login_data" name="{$element[1]}" value="YES" /> </td> </tr> EOT; break; default: cpg_die(CRITICAL_ERROR, 'Invalid action for form creation ' . $element[0], __FILE__, __LINE__); } } if ($op == 'new_user') { echo <<<EOT <tr> <td colspan="2" align="center" class="tablef"> <button type="submit" class="button" name="usermgr_edit_submit" value="{$lang_usermgr_php['submit']}">{$icon_array['ok']}{$lang_usermgr_php['submit']}</button> <input type="hidden" name="form_token" value="{$form_token}" /> <input type="hidden" name="timestamp" value="{$timestamp}" /> </td> </tr> EOT; } else { echo <<<EOT <tr> <td colspan="2" class="tableh2"> {$lang_usermgr_php['notes']} </td> </tr> <tr> <td colspan="2" class="tableb"> <ul> <li>{$lang_usermgr_php['note_list']}</li> </ul> </td> </tr> <tr> <td colspan="2" align="center" class="tablef"> <button type="submit" class="button" name="usermgr_edit_submit" value="{$lang_usermgr_php['modify_user']}">{$icon_array['ok']}{$lang_usermgr_php['modify_user']}</button> <input type="hidden" name="form_token" value="{$form_token}" /> <input type="hidden" name="timestamp" value="{$timestamp}" /> </td> </tr> EOT; } endtable(); echo '</form>'; }
<span style="color:red"><b>{$lang_login_php['cookie_warning']}<b></span> </td> </tr> EOT; } if ($CONFIG['reg_requires_valid_email'] == 1) { $send_activation_link = '<br /><a href="send_activation.php" class="topmenu">' . $lang_login_php['send_activation_link'] . '</a>'; } pageheader($lang_login_php['login']); if ($superCage->get->getInt('force_login')) { msg_box($lang_login_php['force_login_title'], $lang_login_php['force_login']); } //$referer = urlencode($referer); echo '<form action="login.php?referer=' . urlencode($CPG_REFERER) . '" method="post" name="loginbox" id="cpgform">'; starttable('-1', $lang_login_php['enter_login_pswd'], 2); //see how users are allowed to login, can be username, email address or both $login_method = $lang_login_php[$CONFIG['login_method']]; echo <<<EOT {$login_failed} {$cookie_warning} <tr> <td class="tableb" width="40%">{$login_method}</td> <td class="tableb" width="60%"><input type="text" class="textinput" name="username" style="width: 100%" tabindex="1" /></td> </tr> <tr> <td class="tableb">{$lang_login_php['password']}</td> <td class="tableb"><input type="password" class="textinput" name="password" style="width: 100%" tabindex="2" /></td> </tr> <tr> <td colspan="2" align="center" class="tableb">{$lang_login_php['remember_me']} <input name="remember_me" type="checkbox" class="checkbox" value="1" tabindex="3" /></td>
} if ($slider_numberofpics < 8) { $slider_numberofpics = 8; } if ($slider_speed != strval(intval($slider_speed))) { $slider_speed = 1; } if ($slider_speed > 10 || $slider_speed < 1) { $slider_speed = 1; } $s = "UPDATE `{$CONFIG['TABLE_PREFIX']}plugin_slider` SET slider_pictype=('{$slider_pictype}'), slider_autowidth=({$slider_autowidth}), slider_useenlarge=({$slider_useenlarge}), slider_album=('{$slider_album}'), slider_width=({$slider_width}), slider_numberofpics=({$slider_numberofpics}), slider_speed=({$slider_speed}), slider_bgcolor=('{$slider_bgcolor}'), slider_skipportrait=({$slider_skipportrait}), slider_align=('{$slider_align}')"; cpg_db_query($s); msg_box($lang_plugin_slider['display_name'], $lang_plugin_slider['update_success']); } require './plugins/slider/include/load_sliderset.php'; starttable('100%', $lang_plugin_slider['main_title'] . ' - Version ' . $lang_plugin_slider['version']); ?> <TR> <TD class=tableh2 colSpan=3><?php echo $lang_plugin_slider['main_title']; ?> </TD> </TR> <TR> <td><form action="<?php $_SERVER['PHP_SELF']; ?> " method="post" name="slider_settings"> <table class="maintable" cellSpacing="2" cellPadding="2" width="100%" align="<?php echo $align;
} if (d.name == "checkAll") { document.getElementsByName('checkAll2')[0].checked = document.getElementsByName('checkAll')[0].checked; } else { document.getElementsByName('checkAll')[0].checked = document.getElementsByName('checkAll2')[0].checked; } } --> </script> <form action="{$_SERVER['PHP_SELF']}?start={$start}&count={$count}" method="post" name="editForm"> EOT; // make up the table header starttable('100%'); if ($nb_com_del > 0) { $msg_txt = sprintf($lang_reviewcom_php['n_comm_del'], $nb_com_del); echo <<<EOT <tr> <td class="tableh2" colspan="5" align="center"> <br /><b>{$msg_txt}</b><br /><br /> </td> </tr> EOT; } echo <<<EOT <tr> <td class="tableh1" colspan="5"> <table border="0" cellspacing="0" cellpadding="0" width="100%">
<th class="tableh1" align="center"><strong><span class="statlink">{$lang_catmgr_php['move_into']}</span></strong></th> </tr> EOT; display_cat_list(); endtable(); $op = $current_category['cid'] ? 'updatecat' : 'createcat'; echo <<<EOT </td> </tr> <tr> <td class="tableb"> <form method="post" action="catmgr.php?op={$op}"> EOT; $help_update_create = ' ' . cpg_display_help('f=categories.htm&as=cat_cp_page_controls_create&ae=cat_cp_page_controls_create_end&top=1', '800', '600'); starttable('100%', $lang_catmgr_php['update_create'] . $help_update_create, 2); $lb = cat_list_box($current_category['cid'], $current_category['parent'], false); $ug_lb = usergroup_list_box($current_category['cid']); $description_help = ' ' . cpg_display_help('f=categories.htm&as=cat_album_create&ae=cat_album_create_end&top=1', '600', '250'); $albumCreateHelp = ' ' . cpg_display_help('f=categories.htm&as=cat_album_create&ae=cat_album_create_end&top=1', '600', '250'); echo <<<EOT <tr> <td width="40%" class="tableb"> {$lang_catmgr_php['parent_cat']} </td> <td width="60%" class="tableb" valign="top"> {$lb} </td> </tr> <tr>
<label for="process_all_buttons0" class="clickable_option">{$lang_common['no']}</label> <input type="radio" name="process_all_buttons" id="process_all_buttons1" onClick="{$tag_all_buttons['process'][1]}" /> <label for="process_all_buttons1" class="clickable_option">{$lang_common['yes']}</label> </td> <td class="tableb"> <input type="radio" name="show_all_buttons" id="show_all_buttons0" onClick="{$tag_all_buttons['show'][0]}" /> <label for="show_all_buttons0" class="clickable_option">{$lang_common['no']}</label> <input type="radio" name="show_all_buttons" id="show_all_buttons1" onClick="{$tag_all_buttons['show'][1]}" /> <label for="show_all_buttons1" class="clickable_option">{$lang_common['yes']}: {$lang_plugin_bbcode_control['enable_admin']}</label> <input type="radio" name="show_all_buttons" id="show_all_buttons2" onClick="{$tag_all_buttons['show'][2]}" /> <label for="show_all_buttons2" class="clickable_option">{$lang_common['yes']}: {$lang_plugin_bbcode_control['enable_all']}</label> </td> </tr> EOT; endtable(); starttable("100%", "[img] - " . $lang_gallery_admin_menu['admin_lnk'], 2); $local_images = mysql_result(cpg_db_query("SELECT value FROM {$CONFIG['TABLE_CONFIG']} WHERE name = 'bbcode_control_tag_img_localhost_only'"), 0); $selected_local[0] = $selected_local[1] = ""; $selected_local[$local_images] = "checked=\"checked\""; $max_width = mysql_result(cpg_db_query("SELECT value FROM {$CONFIG['TABLE_CONFIG']} WHERE name = 'bbcode_control_tag_img_max_width'"), 0); $max_height = mysql_result(cpg_db_query("SELECT value FROM {$CONFIG['TABLE_CONFIG']} WHERE name = 'bbcode_control_tag_img_max_height'"), 0); $embed_code = mysql_result(cpg_db_query("SELECT value FROM {$CONFIG['TABLE_CONFIG']} WHERE name = 'bbcode_control_tag_img_embed_code'"), 0); $selected_embed[0] = $selected_embed[1] = ""; $selected_embed[$embed_code] = "checked=\"checked\""; echo <<<EOT <tr> <td class="tableb"> {$lang_plugin_bbcode_control['local_images']} </td> <td class="tableb"> <input type="radio" name="local_images" value="0" id="local_images0" {$selected_local[0]} />
exit; // something has been found end } else { $lookup_failed = <<<EOT <tr> <td colspan="2" align="center" class="tableh2"> <font size="1" color="red"><b>{$lang_forgot_passwd_php['err_unk_user']}<b></font> </td> </tr> EOT; } } pageheader($lang_forgot_passwd_php['forgot_passwd']); echo '<form action="forgot_passwd.php" method="post" name="passwordreminder">'; starttable('-1', $lang_forgot_passwd_php['forgot_passwd'], 2); echo <<<EOT {$lookup_failed} <tr> <td class="tableb" width="40%">{$lang_forgot_passwd_php['enter_username_email']}</td> <td class="tableb" width="60%"><input type="text" class="textinput" name="username" style="width: 100%"></td> <script language="javascript" type="text/javascript"> <!-- document.passwordreminder.username.focus(); --> </script> </tr> <tr> <td colspan="2" align="center" class="tablef"><input name="submitted" type="submit" class="button" value="{$lang_forgot_passwd_php['submit']}"></td> </tr>
function imageflow_mainpage($matches) { global $CONFIG, $lang_plugin_imageflow, $FORBIDDEN_SET, $IMAGEFLOWSET, $lang_meta_album_names, $META_ALBUM_SET; if ($matches[1] != 'imageflow') { return $matches; } require './plugins/imageflow/include/init.inc.php'; echo "<!-- Start Imageflow PlugIn " . $lang_plugin_imageflow['version'] . " -->\n"; if ($IMAGEFLOWSET['imageflow_standardtable']) { starttable("100%", $lang_meta_album_names[$IMAGEFLOWSET['imageflow_album']]); echo "<tr><td>"; } if ($IMAGEFLOWSET['imageflow_align'] == "center") { echo "<center>\r\n "; } if ($IMAGEFLOWSET['imageflow_intable']) { echo "<div id=\"imgflowcontainer\" style=\"width:" . $IMAGEFLOWSET['imageflow_width'] . ";\">\r\n "; } ?> <div id="imageflow"> <div id="imgflowloading"> <b><?php echo $lang_plugin_imageflow['loading']; ?> </b><br/> <img src="plugins/imageflow/js/loading.gif" width="208" height="13" alt="loading" /> </div> <div id="imgflowimages"> <?php // maximum pics to show $imageflowlimit = $IMAGEFLOWSET['imageflow_numberofpics']; // request of your database $imageflow_pics = ''; $imageflow_FORBIDDEN_SET = ""; if ($FORBIDDEN_SET != "") { $imageflow_FORBIDDEN_SET = "AND {$FORBIDDEN_SET}"; } // request string for meta album toprated if ($IMAGEFLOWSET['imageflow_album'] == "toprated") { $imageflow_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' AND approved = 'YES' {$imageflow_FORBIDDEN_SET} AND votes >= '{$CONFIG['min_votes_for_rating']}' {$META_ALBUM_SET} ORDER BY pic_rating DESC, votes DESC, pid DESC LIMIT {$imageflowlimit}"; } else { if ($IMAGEFLOWSET['imageflow_album'] == "topn") { $imageflow_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' AND approved = 'YES' {$imageflow_FORBIDDEN_SET} AND hits > 0 {$META_ALBUM_SET} ORDER BY hits DESC, filename LIMIT {$imageflowlimit}"; } else { if ($IMAGEFLOWSET['imageflow_album'] == "lastup") { $imageflow_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' AND approved = 'YES' {$imageflow_FORBIDDEN_SET} {$META_ALBUM_SET} ORDER BY pid DESC LIMIT {$imageflowlimit}"; } else { $imageflow_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' AND approved = 'YES' {$imageflow_FORBIDDEN_SET} {$META_ALBUM_SET} ORDER BY RAND() LIMIT {$imageflowlimit}"; } } } // result of request $imageflow_result = cpg_db_query($imageflow_query); // For reading result $imageflow_rowset = array(); // Index of tab $i = 0; // for each pic build HTML code $imgflow_fixedsize = 0; if (strtolower(substr($IMAGEFLOWSET['imageflow_width'], -2)) == "px") { $imgflow_fixedsize = trim(substr($IMAGEFLOWSET['imageflow_width'], 0, strlen($IMAGEFLOWSET['imageflow_width']) - 2)); } while ($imageflow_row = mysql_fetch_array($imageflow_result)) { if (!$IMAGEFLOWSET['imageflow_skipportrait'] || $imageflow_row['pwidth'] > $imageflow_row['pheight']) { // reading pid of pic $imageflow_key = $imageflow_row['pid']; // path of pic, depending if intermediate image is there or not $imageflow_file = get_pic_url($imageflow_row, $IMAGEFLOWSET['imageflow_pictype']); if (!cpgif_my_is_file($imageflow_file)) { $imageflow_file = get_pic_url($imageflow_row, 'fullsize'); } $imageflow_reflfile = get_pic_url($imageflow_row, 'normal'); if (!cpgif_my_is_file($imageflow_reflfile)) { $imageflow_reflfile = get_pic_url($imageflow_row, 'fullsize'); } $imageflow_temppercent = $IMAGEFLOWSET['imageflow_procent']; if ($imageflow_row['pwidth'] < $CONFIG['picture_width'] && $imageflow_row['pheight'] < $CONFIG['picture_width']) { $imageflow_temppercent = 1; } // link of pic if ($IMAGEFLOWSET['imageflow_useenlarge']) { if ($imgflow_fixedsize == 0) { $imageflow_lien = "<img src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&procent=" . $imageflow_temppercent . "&cache=" . $IMAGEFLOWSET['imageflow_cache'] . "&img=" . $imageflow_reflfile . "\" longdesc=\"" . $imageflow_file . "\" class=\"imgflowimg\" name=\"" . $imageflow_row['pid'] . "\" alt=\"" . $imageflow_row['title'] . "\" id=\"iflowpic" . $i . "\" title=\"\" />"; } else { $imageflow_lien = "<img src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&fixed=" . $imgflow_fixedsize . "&cache=" . $IMAGEFLOWSET['imageflow_cache'] . "&img=" . $imageflow_reflfile . "\" longdesc=\"" . $imageflow_file . "\" class=\"imgflowimg\" name=\"" . $imageflow_row['pid'] . "\" alt=\"" . $imageflow_row['title'] . "\" id=\"iflowpic" . $i . "\" title=\"\" />"; } } else { if ($imgflow_fixedsize == 0) { $imageflow_lien = "<img class=\"imgflowimg\" src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&procent=" . $imageflow_temppercent . "&cache=" . $IMAGEFLOWSET['imageflow_cache'] . "&img=" . $imageflow_reflfile . "\" longdesc=\"displayimage.php?pos=-" . $imageflow_key . "\" alt=\"" . $imageflow_row['title'] . "\" />"; } else { $imageflow_lien = "<img class=\"imgflowimg\" src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&fixed=" . $imgflow_fixedsize . "&cache=" . $IMAGEFLOWSET['imageflow_cache'] . "&img=" . $imageflow_reflfile . "\" longdesc=\"displayimage.php?pos=-" . $imageflow_key . "\" alt=\"" . $imageflow_row['title'] . "\" />"; } } // building HTML code $imageflow_pics .= $imageflow_lien . "\n"; $i = $i + 1; } } // free memory mysql_free_result($imageflow_result); /* fill if not enough pictures in current category if 3 or 4, repeat once to get 6 or 8 pics; if 2, repeat four times to get 8 pics; if only 1, repeat 8 times to get 8 pics */ if ($i < 5) { $imageflow_pics = $imageflow_pics . str_replace("iflowpic", "iflow2pic", $imageflow_pics); } if ($i < 3) { $imageflow_pics = $imageflow_pics . str_replace("iflowpic", "iflow3pic", str_replace("iflow2pic", "iflow4pic", $imageflow_pics)); } if ($i < 2) { $imageflow_pics = $imageflow_pics . str_replace("iflow4pic", "iflow8pic", str_replace("iflow3pic", "iflow7pic", str_replace("iflowpic", "iflow5pic", str_replace("iflow2pic", "iflow6pic", $imageflow_pics)))); } // if no pictures found at all in current category, simply take random pictures from whole gallery if ($i < 1) { $imageflow_pics = ''; $imageflow_FORBIDDEN_SET = ""; if ($FORBIDDEN_SET != "") { $imageflow_FORBIDDEN_SET = "AND {$FORBIDDEN_SET}"; } $imageflow_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' AND approved = 'YES' {$imageflow_FORBIDDEN_SET} ORDER BY RAND() LIMIT {$imageflowlimit}"; // result of request $imageflow_result = cpg_db_query($imageflow_query); // For reading result $imageflow_rowset = array(); // Index of tab $i = 0; // For each pic.....building HTML in php $imgflow_fixedsize = 0; if (strtolower(substr($IMAGEFLOWSET['imageflow_width'], -2)) == "px") { $imgflow_fixedsize = trim(substr($IMAGEFLOWSET['imageflow_width'], 0, strlen($IMAGEFLOWSET['imageflow_width']) - 2)); } while ($imageflow_row = mysql_fetch_array($imageflow_result)) { if (!$IMAGEFLOWSET['imageflow_skipportrait'] || $imageflow_row['pwidth'] > $imageflow_row['pheight']) { // reading pid of pic $imageflow_key = $imageflow_row['pid']; // path of pic, depending if intermediate image is there or not $imageflow_file = get_pic_url($imageflow_row, $IMAGEFLOWSET['imageflow_pictype']); if (!cpgif_my_is_file($imageflow_file)) { $imageflow_file = get_pic_url($imageflow_row, 'fullsize'); } $imageflow_reflfile = get_pic_url($imageflow_row, 'normal'); if (!cpgif_my_is_file($imageflow_reflfile)) { $imageflow_reflfile = get_pic_url($imageflow_row, 'fullsize'); } $imageflow_temppercent = $IMAGEFLOWSET['imageflow_procent']; if ($imageflow_row['pwidth'] < $CONFIG['picture_width'] && $imageflow_row['pheight'] < $CONFIG['picture_width']) { $imageflow_temppercent = 1; } // link of pic if ($IMAGEFLOWSET['imageflow_useenlarge']) { if ($imgflow_fixedsize == 0) { $imageflow_lien = "<img src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&procent=" . $imageflow_temppercent . "&cache=" . $IMAGEFLOWSET['imageflow_cache'] . "&img=" . $imageflow_reflfile . "\" longdesc=\"" . $imageflow_file . "\" class=\"imgflowimg\" name=\"" . $imageflow_row['pid'] . "\" alt=\"" . $imageflow_row['title'] . "\" id=\"iflowpic" . $i . "\" title=\"\" />"; } else { $imageflow_lien = "<img src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&fixed=" . $imgflow_fixedsize . "&cache=" . $IMAGEFLOWSET['imageflow_cache'] . "&img=" . $imageflow_reflfile . "\" longdesc=\"" . $imageflow_file . "\" class=\"imgflowimg\" name=\"" . $imageflow_row['pid'] . "\" alt=\"" . $imageflow_row['title'] . "\" id=\"iflowpic" . $i . "\" title=\"\" />"; } } else { if ($imgflow_fixedsize == 0) { $imageflow_lien = "<img class=\"imgflowimg\" src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&procent=" . $imageflow_temppercent . "&cache=" . $IMAGEFLOWSET['imageflow_cache'] . "&img=" . $imageflow_reflfile . "\" longdesc=\"displayimage.php?pos=-" . $imageflow_key . "\" alt=\"" . $imageflow_row['title'] . "\" />"; } else { $imageflow_lien = "<img class=\"imgflowimg\" src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&fixed=" . $imgflow_fixedsize . "&cache=" . $IMAGEFLOWSET['imageflow_cache'] . "&img=" . $imageflow_reflfile . "\" longdesc=\"displayimage.php?pos=-" . $imageflow_key . "\" alt=\"" . $imageflow_row['title'] . "\" />"; } } // building HTML code $imageflow_pics .= $imageflow_lien . "\n"; $i = $i + 1; } } // free memory mysql_free_result($imageflow_result); // if not a single pic in the whole gallery, use dummy pic from plugin folder if ($i < 1) { $imageflow_pics = "<img class=\"imgflowimg\" src=\"plugins/imageflow/js/reflect.php?bgc=" . $IMAGEFLOWSET['imageflow_bgcolor'] . "&procent=" . $IMAGEFLOWSET['imageflow_procent'] . "&cache=0&img=plugins/imageflow/nopicstoshow.jpg\" longdesc=\"\" alt=\"Add Some Pics!\" />"; } /* fill if not enough random pictures in whole gallery if 3 or 4, repeat once to get 6 or 8 pics; if 2, repeat four times to get 8 pics; if only 1, repeat 8 times to get 8 pics */ if ($i < 5) { $imageflow_pics = $imageflow_pics . str_replace("iflowpic", "iflow2pic", $imageflow_pics); } if ($i < 3) { $imageflow_pics = $imageflow_pics . str_replace("iflowpic", "iflow3pic", str_replace("iflow2pic", "iflow4pic", $imageflow_pics)); } if ($i < 2) { $imageflow_pics = $imageflow_pics . str_replace("iflow4pic", "iflow8pic", str_replace("iflow3pic", "iflow7pic", str_replace("iflowpic", "iflow5pic", str_replace("iflow2pic", "iflow6pic", $imageflow_pics)))); } } echo $imageflow_pics; ?> </div> <div id="imgflowcaptions"></div> <div id="imgflowscrollbar"> <div id="imgflowslider"></div> </div> </div> <?php if ($IMAGEFLOWSET['imageflow_intable']) { echo " </div>\r\n "; } if ($IMAGEFLOWSET['imageflow_align'] == "center") { echo "</center>\r\n"; } if ($IMAGEFLOWSET['imageflow_standardtable']) { echo "</td></tr>"; endtable(); } echo "<!-- End Imageflow PlugIn -->\n"; }
function theme_minicms_edit_editor(&$cms) { global $MINICMS, $referer, $lang_minicms, $CONFIG, $THEME_DIR; ob_start(); echo '<SELECT name="type">'; foreach ($MINICMS['conType'] as $key => $conType) { if ($key == $cms['type']) { echo "<OPTION selected value=\"{$key}\">{$conType}</OPTION>"; } else { echo "<OPTION value=\"{$key}\">{$conType}</OPTION>"; } } echo '</SELECT>'; $cms['select_type'] = ob_get_clean(); print <<<EOT <form name="post" method="post" action="index.php?file=minicms/cms_edit&referer={$referer}"> EOT; starttable("100%", $cms['title'], 3); print <<<EOT <tr> <td colspan="3" align="center"> <h2>{$cms['message']}</h2> </td> </tr> <tr> <td>{$lang_minicms['title']}</td> <td>{$lang_minicms['type']}</td> <td>{$lang_minicms['content']}</td> </tr> <tr valign="top"> <td class="row2"> <input value="{$cms['ID']}" type="hidden" name="id" > <input type="text" value="{$cms['title']}" class="post" tabindex="1" style="width: 450px;" maxlength="60" size="45" name="title" /> </td> <td class="row2"> {$cms['select_type']} </td> <td class="row2"> <input type="text" value="{$cms['conid']}" class="post" tabindex="3" style="width: 50px;" maxlength="5" name="conid" /> </td> </tr> <tr valign="top"> <td class="row2" colspan="3"> EOT; foreach (get_smilies_table2() as $smiley) { $smilies[] = $smiley[1]; } //$smilies="['".implode("','",$smilies)."']"; //$smilies=implode(",",$smilies); //echo "<br>$smilies"; $superCage = Inspekt::makeSuperCage(); $cmpath = str_replace('index.php', '', $superCage->server->getRaw('PHP_SELF')); $userfilespath = $cmpath . $CONFIG['fullpath']; $basepath = $cmpath . 'plugins/minicms/fckeditor/'; $oFCKeditor = new FCKeditor('minicms_content'); $oFCKeditor->BasePath = $basepath; $oFCKeditor->Width = '100%'; $oFCKeditor->Height = '350'; $oFCKeditor->Value = $cms['content']; $oFCKeditor->Config['BaseHref'] = $CONFIG['ecards_more_pic_target']; $oFCKeditor->Config['CustomConfigurationsPath'] = $basepath . 'minicms_config.js'; // $oFCKeditor->Config['SmileyPath'] = $cmpath . 'images/smiles/'; //couldn't get the smilies to work // $oFCKeditor->Config['SmileyImages'] = $smilies; //I posted the problem of FCK's project site $oFCKeditor->Config['EditorAreaCSS'] = $cmpath . $THEME_DIR . 'style.css'; $oFCKeditor->Config['StylesXmlPath'] = $basepath . 'style.xml'; // $oFCKeditor->Config['UseBROnCarriageReturn'] = true; I don't think we wan't this option. // $oFCKeditor->Config['LinkBrowserURL'] = $basepath . 'editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath='.$userfilespath; // $oFCKeditor->Config['ImageBrowserURL'] = $basepath . 'editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php&ServerPath='.$userfilespath; // $oFCKeditor->Config['FlashBrowserURL'] = $basepath . 'editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/php/connector.php&ServerPath='.$userfilespath; // $oFCKeditor->Config['MediaBrowserURL'] = $basepath . 'editor/filemanager/browser/default/browser.html?Type=Media&Connector=connectors/php/connector.php&ServerPath='.$userfilespath; // $oFCKeditor->Config['LinkUploadURL'] = $basepath . 'editor/filemanager/upload/php/upload.php&ServerPath='.$userfilespath; // $oFCKeditor->Config['ImageUploadURL'] = $basepath . 'editor/filemanager/upload/php/upload.php?Type=Image&ServerPath='.$userfilespath; // $oFCKeditor->Config['FlashUploadURL'] = $basepath . 'editor/filemanager/upload/php/upload.php?Type=Flash&ServerPath='.$userfilespath; // $oFCKeditor->Config['MediaUploadURL'] = $basepath . 'editor/filemanager/upload/php/upload.php?Type=Media&ServerPath='.$userfilespath; // $oFCKeditor->Config['PluginsPath'] = $basepath . 'editor/plugins/'; // $oFCKeditor->Config['SkinPath'] = $basepath . 'editor/skins/silver/'; // $oFCKeditor->Config['Debug'] = true; // $oFCKeditor->Config['UserFilesPath'] = $userfilespath; $oFCKeditor->Create(); print <<<EOT </td> </tr> <tr> <td align="center" colspan="3" class="catBottom"> <input value="{$lang_minicms['preview']}" class="mainoption" name="submit" tabindex="5" type="submit"> <input value="{$lang_minicms['submit']}" class="mainoption" name="submit" tabindex="6" accesskey="s" type="submit"> </td> </tr> </form> EOT; endtable(); }
function display_plugin_list() { global $CPG_PLUGINS, $lang_pluginmgr_php, $lang_plugin_php, $lang_common, $CONFIG, $CPG_PHP_SELF; $help = ' ' . cpg_display_help('f=plugins.htm&as=plugin_manager&ae=plugin_manager_end&top=1', '800', '600'); $help_plugin_enable = cpg_display_help('f=configuration.htm&as=admin_general_enable-plugins&ae=admin_general_enable-plugins_end', 400, 300); // configure plugin api (enabled or disabled) $yes_selected = $CONFIG['enable_plugins'] ? 'checked="checked"' : ''; $no_selected = !$CONFIG['enable_plugins'] ? 'checked="checked"' : ''; print '<form name="pluginenableconfig" id="cpgform2" action="' . $CPG_PHP_SELF . '" method="post" style="margin:0px;padding:0px">'; starttable('-1', $lang_pluginmgr_php['pmgr'] . $help, 3); echo <<<EOT <tr> <td class="tableh2" colspan="3"> {$lang_pluginmgr_php['explanation']} </td> </tr> <tr> <td class="tableb"> {$lang_pluginmgr_php['plugin_enabled']} </td> <td class="table"> <input type="radio" id="enable_plugins1" name="enable_plugins" value="1" onclick="document.pluginenableconfig.submit();" {$yes_selected} /><label for="enable_plugins1" class="clickable_option">{$lang_common['yes']}</label> <input type="radio" id="enable_plugins0" name="enable_plugins" value="0" onclick="document.pluginenableconfig.submit();" {$no_selected} /><label for="enable_plugins0" class="clickable_option">{$lang_common['no']}</label> <input type="hidden" name="update_config" value="1" /> </td> <td class="tableb"> {$help_plugin_enable} </td> </tr> EOT; endtable(); print '</form>'; echo <<<EOT <br /> EOT; $help = ' ' . cpg_display_help('f=plugins.htm&as=plugin_manager_uninstall&ae=plugin_manager_uninstall_end&top=1', '640', '480'); $available_plugins = cpg_get_dir_list('./plugins/'); starttable('100%'); echo <<<EOT <tr> <td class="tableh1" width="90%"><strong><span class="statlink">{$lang_pluginmgr_php['i_plugins']}</span></strong></td> <td colspan="3" class="tableh1" align="center" width="10%"><strong><span class="statlink">{$lang_pluginmgr_php['operation']}</span></strong>{$help}</td> </tr> EOT; $installed_count = 0; $loop_counter = 0; foreach ($CPG_PLUGINS as $thisplugin) { $installed_count++; unset($extra_info); unset($install_info); include './plugins/' . $thisplugin->path . '/configuration.php'; $pluginPath = $thisplugin->path; $safename = addslashes(str_replace(' ', '', $name)); if (isset($extra_info) == TRUE) { $extra = $extra_info; } else { $extra = ''; } if (sizeof($thisplugin->error) > 0) { $error = $thisplugin->error['desc']; $extra = '<tr><td class="tableb" width="100%" colspan="2">' . '<strong>' . $lang_common['error'] . ':</strong> <span style="color:red;">' . $error . '</span>' . '</td></tr>' . $extra; } if ($loop_counter == 0) { $row_style_class = 'tableb'; } else { $row_style_class = 'tableb tableb_alternate'; } $loop_counter++; if ($loop_counter > 1) { $loop_counter = 0; } echo <<<EOT <tr> <td width="90%" class="{$row_style_class}"> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="maintable"> <tr> <td colspan="2" class="tableh1">{$name} ({$pluginPath}): {$lang_pluginmgr_php['vers']}{$version}</td> </tr> <tr> <td class="tableb" width="20%" valign="top">{$lang_pluginmgr_php['extra']}:</td> <td class="tableb" valign="top">{$extra}</td> </tr> <tr> <td class="tableb tableb_alternate" valign="top">{$lang_pluginmgr_php['author']}:</td> <td class="tableb tableb_alternate" valign="top">{$author}</td> </tr> <tr> <td class="tableb" valign="top">{$lang_pluginmgr_php['desc']}</td> <td class="tableb" valign="top">{$description}</td> </tr> </table> </td> <td class="{$row_style_class}" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> EOT; if ($thisplugin->index > 0 && count($CPG_PLUGINS) > 1) { echo <<<EOT <td width="3%" align="center" valign="middle"> <a href="pluginmgr.php?op=moveu&p={$thisplugin->plugin_id}"><img src="images/up.gif" border="0" alt="" /></a> </td> EOT; } else { echo '<td width="3%"><img src="images/spacer.gif" width="16" height="16" /></td>'; } if ($thisplugin->index < count($CPG_PLUGINS) - 1) { echo <<<EOT <td width="3%" align="center" valign="middle"> <a href="pluginmgr.php?op=moved&p={$thisplugin->plugin_id}"><img src="images/down.gif" border="0" alt="" /></a> </td> EOT; } else { echo '<td width="3%"><img src="images/spacer.gif" width="16" height="16" /></td>'; } echo <<<EOT <td width="3%" align="center" valign="middle"> <a href="pluginmgr.php?op=uninstall&p={$thisplugin->plugin_id}" onClick="return confirmUninstall('{$safename}')"> <img src="images/delete.gif" border="0" alt="" /> </a> </td> </tr> </table> </td> </tr> EOT; } if ($installed_count == 0) { echo '<tr><td colspan="4" class="tableb" align="center">' . $lang_pluginmgr_php['none_installed'] . '</td></tr>'; } endtable(); echo '<p> </p>'; echo '<form name="cpgform" id="cpgform" action="pluginmgr.php?op=upload" method="post" enctype="multipart/form-data">'; $help_upload = ' ' . cpg_display_help('f=plugins.htm&as=plugin_manager_upload&ae=plugin_manager_upload_end&top=1', '640', '480'); $help_install = ' ' . cpg_display_help('f=plugins.htm&as=plugin_manager_install&ae=plugin_manager_install_end&top=1', '640', '480'); starttable('100%'); echo <<<EOT <tr> <td class="tableh1" width="90%"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left"> <strong><span class="statlink">{$lang_pluginmgr_php['n_plugins']}</span></strong>{$help_install} </td> <td align="right"> <input type="file" size="40" name="plugin" class="textinput" /> <input type="submit" class="button" value="{$lang_pluginmgr_php['upload']}" /> {$help_upload} </td> </tr> </table> </td> <td colspan="3" class="tableh1" align="center" width="10%"><strong><span class="statlink">{$lang_pluginmgr_php['operation']}</span></strong></td> </tr> EOT; $loop_counter = 0; foreach ($available_plugins as $path) { if (($plugin_id = CPGPluginAPI::installed($path)) === false) { // If codebase.php and configuration.php don't exist, skip this folder if (!(file_exists('./plugins/' . $path . '/codebase.php') && file_exists('./plugins/' . $path . '/configuration.php'))) { continue; } unset($extra_info); unset($install_info); include './plugins/' . $path . '/configuration.php'; $pluginPath = $path; $safename = addslashes(str_replace(' ', '', $name)); if (isset($install_info) == TRUE) { $extra = $install_info; } else { $extra = ''; } if ($loop_counter == 0) { $row_style_class = 'tableb'; } else { $row_style_class = 'tableb tableb_alternate'; } $loop_counter++; if ($loop_counter > 1) { $loop_counter = 0; } echo <<<EOT <tr> <td width="90%" class="{$row_style_class}"> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="maintable"> <tr> <td colspan="2" class="tableh1">{$name} ({$pluginPath}): {$lang_pluginmgr_php['vers']}{$version}</td> </tr> <tr> <td class="tableb tableb_alternate" width="20%" valign="top">{$lang_pluginmgr_php['author']}:</td> <td class="tableb tableb_alternate" valign="top">{$author}</td> </tr> <tr> <td class="tableb" valign="top">{$lang_pluginmgr_php['desc']}:</td> <td class="tableb" valign="top">{$description}</td> </tr> EOT; if ($extra != '') { echo <<<EOT <tr> <td class="tableb tableb_alternate" width="20%" valign="top">{$lang_pluginmgr_php['install_info']}:</td> <td class="tableb tableb_alternate" valign="top">{$extra}</td> </tr> EOT; } echo <<<EOT </table> </td> <td class="{$row_style_class}" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="5%" align="center" valign="top"> <img src="images/spacer.gif" width="16" height="16" /> </td> <td width="5%" align="center" valign="top"> <a href="pluginmgr.php?op=install&p={$path}"><img src="images/info.gif" border="0" alt="" /></a> </td> <td width="5%" align="center" valign="top"> <a href="pluginmgr.php?op=delete&p={$path}" onClick="return confirmDel('{$safename}')"> <img src="images/delete.gif" border="0" alt="" /> </a> </td> </tr> </table> </td> </tr> EOT; } } echo '</form>'; endtable(); }
echo $alb['description']; } ?> </td> </tr> <?php } endtable(); echo '<br/>'; } } if ($superCage->get->keyExists('category_title')) { $category_query = "SELECT cid, name FROM `{$CONFIG['TABLE_CATEGORIES']}` WHERE (`name` " . implode(" {$type} `name` ", $albcat_terms) . ')'; $result = cpg_db_query($category_query); if (mysql_num_rows($result) > 0) { starttable('100%', $lang_meta_album_names['category_search'], 2); while ($cat = mysql_fetch_array($result, MYSQL_ASSOC)) { $album_q = "SELECT aid, title FROM `{$CONFIG['TABLE_ALBUMS']}` AS p WHERE (`category` = '{$cat['cid']}') {$FORBIDDEN_SET} ORDER BY `aid` DESC LIMIT 1"; $album_r = cpg_db_query($album_q); $album = mysql_fetch_array($album_r); // TODO: This is weird. It seems to pull in the largest aid's thumb for the category image? $thumb_query = "SELECT filepath, filename, url_prefix, pwidth, pheight " . " FROM `{$CONFIG['TABLE_PICTURES']}` " . " WHERE (`aid` = '{$album['aid']}') " . " AND approved = 'YES' " . " ORDER BY `pid` DESC"; $thumb_result = cpg_db_query($thumb_query); $thumb = mysql_fetch_assoc($thumb_result); $thumb_url = get_pic_url($thumb, 'thumb'); $thumb_size = compute_img_size($thumb['pwidth'], $thumb['pheight'], $CONFIG['alb_list_thumb_size'], true, 'cat_thumb'); ?> <tr> <td colspan="3" height="1" valign="top" class="tableh2"> <span class="alblink"><a href="<?php printf("index.php?cat=%u", $cat['cid']);
if (!$files) { $files = 0; } mysql_free_result($result); echo <<<EOT <br /> <form action="db_input.php" method="post" name="reset_views_form" id="cpgform" onSubmit="return defaultagree(this)"> <input type="hidden" name="event" value="album_reset" /> <input type="hidden" name="aid" value="{$CLEAN['album']}" /> EOT; // set up the translation strings $translation_reset_views = sprintf($lang_modifyalb_php['reset_views'], '"' . $ALBUM_DATA['title'] . '"'); $translation_reset_rating = sprintf($lang_modifyalb_php['reset_rating'], '"' . $ALBUM_DATA['title'] . '"'); $translation_delete_comments = sprintf($lang_modifyalb_php['delete_comments'], '"' . $ALBUM_DATA['title'] . '"'); $translation_delete_files = sprintf($lang_modifyalb_php['delete_files'], '<span style="color:red;font-weight:bold">', '</span>', '"' . $ALBUM_DATA['title'] . '"'); starttable('100%', $lang_modifyalb_php['reset_album'], 2); echo <<<EOT <tr> <td align="left" class="tableb"> <b>{$hits}</b> {$lang_modifyalb_php['views']} </td> <td align="left" class="tableb"> <input type="Checkbox" name="reset_views" id="reset_views" value="1" class="checkbox" /><label for="reset_views" class="clickable_option">{$translation_reset_views}</label> </td> </tr> <tr> <td align="left" class="tableb"> <b>{$votes}</b> {$lang_modifyalb_php['votes']} </td> <td align="left" class="tableb"> <input type="Checkbox" name="reset_rating" id="reset_rating" value="1" class="checkbox" /><label for="reset_rating" class="clickable_option">{$translation_reset_rating}</label>
<?php // If this file is called, all images in the database will be processed // I don't know, if this causes a problem when there are a lot of images :-) global $CONFIG, $flf_lang_var; if (!GALLERY_ADMIN_MODE) { cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__); } pageheader($flf_lang_var['deleteallhistograms']); require_once 'include/histotag_histogram_support.php'; starttable("90%"); $insertedvalues = deleteAllHistograms(); print $insertedvalues . " " . $flf_lang_var['deleteallhistograms_success']; endtable(); pagefooter(); ob_end_flush();
Copyright (c) 2003-2014 Coppermine Dev Team v1.0 originally written by Gregory Demar This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. ******************************************** Coppermine version: 1.6.01 $HeadURL$ $Revision$ **********************************************/ /** * This file gets included in index.php if you set the option on the configuration panel: "content of the main page". * It can be used to display any content from any program, it is to be edited according to one's tastes. */ if (!defined('IN_COPPERMINE')) { die('Not in Coppermine...'); } starttable("100%", $lang_index_php['welcome']); echo <<<EOT <tr> <td class="tableb"> Here is text in the "anycontent" block.<br /> Edit the file "anycontent.php" in your Coppermine folder to change what is shown here.<br /> To show this block on your gallery, go to the configuration panel under "Album List View", then "content of the main page". </td> </tr> EOT; endtable();
document.editForm.sort.value = sortcriteria; document.editForm.dir.value= direction; sendForm(); } //--> </script> EOT; if ($type == 'vote') { $query = "SELECT * FROM {$CONFIG['TABLE_VOTE_STATS']} WHERE pid={$pid} ORDER BY {$sort} {$dir}"; } if ($type == 'hits') { $query = "SELECT * FROM {$CONFIG['TABLE_HIT_STATS']} WHERE pid={$pid} ORDER BY {$sort} {$dir}"; } $result = cpg_db_query($query); // display the table header start starttable("100%", $lang_stat_details_php[$type], count($db_fields)); print " <tr>\n"; foreach ($db_fields as $value) { $show_column_checked[$value] = ${$value} == '1' ? 'checked="checked"' : ''; print ' <td class="tableh2" valign="top">' . $line_break; print ' '; print '<input type="checkbox" name="' . $value . '" value="1" class="checkbox" title="' . $lang_stat_details_php['show_hide'] . '" ' . $show_column_checked[$value] . ' onclick="sendForm();" />' . $line_break; print ' ' . $lang_stat_details_php[$value]; if (${$value} == 1) { print '<a href="#" onclick="return sortthetable(\'' . $value . '\',\'asc\');">'; print '<img src="images/ascending.gif" width="9" height="9" border="0" alt="" title="' . sprintf($lang_stat_details_php['sort_by_xxx'], $value) . ', ' . $lang_stat_details_php['ascending'] . '" />'; print '</a>'; print '<a href="#" onclick="return sortthetable(\'' . $value . '\',\'desc\');">'; print '<img src="images/descending.gif" width="9" height="9" border="0" alt="" title="' . sprintf($lang_stat_details_php['sort_by_xxx'], $lang_stat_details_php[$value]) . ', ' . $lang_stat_details_php['descending'] . '" />'; print '</a>'; }
// only loop if config value is set --- end } } // display config page // Set the option output stuff if ($CONFIG['plugin_template_adminmode'] == '1') { $option_output['plugin_template_adminmode'] = 'checked="checked"'; } else { $option_output['plugin_template_adminmode'] = ''; } pageheader(sprintf($lang_plugin_template['configure_x'], $lang_plugin_template['plugin_name'])); list($timestamp, $form_token) = getFormToken(); echo <<<EOT <form action="index.php?file=template/admin" method="post" name="template_settings"> EOT; starttable('100%', sprintf($lang_plugin_template['configure_x'], $lang_plugin_template['plugin_name']), 3, 'cpg_zebra'); if ($superCage->post->keyExists('submit')) { if ($config_changes_counter > 0) { echo <<<EOT <tr> <td class="tablef" colspan="2" > EOT; msg_box('', $lang_plugin_template['update_success'], '', '', 'success'); } else { msg_box('', $lang_plugin_template['no_changes'], '', '', 'validation'); } echo <<<EOT </td> </tr> EOT; }
function flf_histotag_configure() { global $CONFIG, $thisplugin, $lang_common, $thumb_rotate_icon_array, $lang_errors, $flf_lang_var, $imagerotate_exist; $superCage = Inspekt::makeSuperCage(); if (!GALLERY_ADMIN_MODE) { cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__); } // Populate the form fields and run the queries for the submit form $config_changes_counter = 0; $dump_cache = 0; // plugin_flf_histotag_histoquality if ($superCage->post->keyExists('plugin_flf_histotag_histoquality') == TRUE) { if ($superCage->post->getInt('plugin_flf_histotag_histoquality') >= 0 && $superCage->post->getInt('plugin_flf_histotag_histoquality') <= 100 && $CONFIG['plugin_flf_histotag_histoquality'] != $superCage->post->getInt('plugin_flf_histotag_histoquality')) { $CONFIG['plugin_flf_histotag_histoquality'] = $superCage->post->getInt('plugin_flf_histotag_histoquality'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_histoquality']}' WHERE name='plugin_flf_histotag_histoquality'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } // bgcolor if ($superCage->post->keyExists('plugin_flf_histotag_histocolor') == TRUE) { $temp = $superCage->post->getRaw('plugin_flf_histotag_histocolor'); // Usually, we would not use that method, but we'll sanitize later. $temp = '#' . strtoupper(ltrim($temp, '#')); if (preg_match('/^#(?:(?:[a-f\\d]{3}){1,2})$/i', $temp)) { if ($CONFIG['plugin_flf_histotag_histocolor'] != $temp) { $CONFIG['plugin_flf_histotag_histocolor'] = $temp; $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_histocolor']}' WHERE name='plugin_flf_histotag_histocolor'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } } // Map Width if ($superCage->post->keyExists('plugin_flf_histotag_mapwidth') == TRUE) { if ($superCage->post->getInt('plugin_flf_histotag_mapwidth') >= 0 && $superCage->post->getInt('plugin_flf_histotag_mapwidth') <= 1280 && $CONFIG['plugin_flf_histotag_mapwidth'] != $superCage->post->getInt('plugin_flf_histotag_mapwidth')) { $CONFIG['plugin_flf_histotag_mapwidth'] = $superCage->post->getInt('plugin_flf_histotag_mapwidth'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_mapwidth']}' WHERE name='plugin_flf_histotag_mapwidth'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } // Map Height if ($superCage->post->keyExists('plugin_flf_histotag_mapheight') == TRUE) { if ($superCage->post->getInt('plugin_flf_histotag_mapheight') >= 0 && $superCage->post->getInt('plugin_flf_histotag_mapheight') <= 1024 && $CONFIG['plugin_flf_histotag_mapheight'] != $superCage->post->getInt('plugin_flf_histotag_mapheight')) { $CONFIG['plugin_flf_histotag_mapheight'] = $superCage->post->getInt('plugin_flf_histotag_mapheight'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_mapheight']}' WHERE name='plugin_flf_histotag_mapheight'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } // Map Box Width if ($superCage->post->keyExists('plugin_flf_histotag_mapboxwidth') == TRUE) { if ($superCage->post->getInt('plugin_flf_histotag_mapboxwidth') >= 0 && $superCage->post->getInt('plugin_flf_histotag_mapboxwidth') <= 1280 && $CONFIG['plugin_flf_histotag_mapboxwidth'] != $superCage->post->getInt('plugin_flf_histotag_mapboxwidth')) { $CONFIG['plugin_flf_histotag_mapboxwidth'] = $superCage->post->getInt('plugin_flf_histotag_mapboxwidth'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_mapboxwidth']}' WHERE name='plugin_flf_histotag_mapboxwidth'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } // Map Height if ($superCage->post->keyExists('plugin_flf_histotag_mapboxheight') == TRUE) { if ($superCage->post->getInt('plugin_flf_histotag_mapboxheight') >= 0 && $superCage->post->getInt('plugin_flf_histotag_mapboxheight') <= 1024 && $CONFIG['plugin_flf_histotag_mapboxheight'] != $superCage->post->getInt('plugin_flf_histotag_mapboxheight')) { $CONFIG['plugin_flf_histotag_mapboxheight'] = $superCage->post->getInt('plugin_flf_histotag_mapboxheight'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_mapboxheight']}' WHERE name='plugin_flf_histotag_mapboxheight'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } // API key if ($superCage->post->keyExists('plugin_flf_histotag_apikey') == TRUE) { $temp = $superCage->post->getRaw('plugin_flf_histotag_apikey'); if ($CONFIG['plugin_flf_histotag_apikey'] != $temp) { $CONFIG['plugin_flf_histotag_apikey'] = $temp; $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_apikey']}' WHERE name='plugin_flf_histotag_apikey'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } if ($superCage->post->keyExists('plugin_flf_histotag_mapmode') == TRUE && $superCage->post->getInt('plugin_flf_histotag_mapmode') != $CONFIG['plugin_flf_histotag_mapmode']) { $CONFIG['plugin_flf_histotag_mapmode'] = $superCage->post->getInt('plugin_flf_histotag_mapmode'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_mapmode']}' WHERE name='plugin_flf_histotag_mapmode'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } switch ($CONFIG['plugin_flf_histotag_mapmode']) { case 1: $option_output['plugin_flf_histotag_mapmode_2'] = ''; $option_output['plugin_flf_histotag_mapmode_3'] = ''; $option_output['plugin_flf_histotag_mapmode_4'] = ''; $option_output['plugin_flf_histotag_mapmode_5'] = ''; $option_output['plugin_flf_histotag_mapmode_1'] = 'checked="checked"'; break; case 2: $option_output['plugin_flf_histotag_mapmode_1'] = ''; $option_output['plugin_flf_histotag_mapmode_3'] = ''; $option_output['plugin_flf_histotag_mapmode_4'] = ''; $option_output['plugin_flf_histotag_mapmode_5'] = ''; $option_output['plugin_flf_histotag_mapmode_2'] = 'checked="checked"'; break; case 3: $option_output['plugin_flf_histotag_mapmode_2'] = ''; $option_output['plugin_flf_histotag_mapmode_1'] = ''; $option_output['plugin_flf_histotag_mapmode_4'] = ''; $option_output['plugin_flf_histotag_mapmode_5'] = ''; $option_output['plugin_flf_histotag_mapmode_3'] = 'checked="checked"'; break; case 4: $option_output['plugin_flf_histotag_mapmode_2'] = ''; $option_output['plugin_flf_histotag_mapmode_3'] = ''; $option_output['plugin_flf_histotag_mapmode_1'] = ''; $option_output['plugin_flf_histotag_mapmode_5'] = ''; $option_output['plugin_flf_histotag_mapmode_4'] = 'checked="checked"'; break; case 5: $option_output['plugin_flf_histotag_mapmode_2'] = ''; $option_output['plugin_flf_histotag_mapmode_3'] = ''; $option_output['plugin_flf_histotag_mapmode_4'] = ''; $option_output['plugin_flf_histotag_mapmode_1'] = ''; $option_output['plugin_flf_histotag_mapmode_5'] = 'checked="checked"'; break; default: $option_output['plugin_flf_histotag_mapmode_2'] = ''; $option_output['plugin_flf_histotag_mapmode_3'] = ''; $option_output['plugin_flf_histotag_mapmode_4'] = ''; $option_output['plugin_flf_histotag_mapmode_5'] = ''; $option_output['plugin_flf_histotag_mapmode_1'] = 'checked="checked"'; } if ($superCage->post->keyExists('plugin_flf_histotag_geosupport') == TRUE && $superCage->post->getInt('plugin_flf_histotag_geosupport') != $CONFIG['plugin_flf_histotag_geosupport']) { $CONFIG['plugin_flf_histotag_geosupport'] = $superCage->post->getInt('plugin_flf_histotag_geosupport'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_geosupport']}' WHERE name='plugin_flf_histotag_geosupport'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } switch ($CONFIG['plugin_flf_histotag_geosupport']) { case 1: $option_output['plugin_flf_histotag_geosupport_2'] = ''; $option_output['plugin_flf_histotag_geosupport_3'] = ''; $option_output['plugin_flf_histotag_geosupport_1'] = 'checked="checked"'; break; case 2: $option_output['plugin_flf_histotag_geosupport_1'] = ''; $option_output['plugin_flf_histotag_geosupport_3'] = ''; $option_output['plugin_flf_histotag_geosupport_2'] = 'checked="checked"'; break; case 3: $option_output['plugin_flf_histotag_geosupport_2'] = ''; $option_output['plugin_flf_histotag_geosupport_1'] = ''; $option_output['plugin_flf_histotag_geosupport_3'] = 'checked="checked"'; break; default: $option_output['plugin_flf_histotag_geosupport_2'] = ''; $option_output['plugin_flf_histotag_geosupport_3'] = ''; $option_output['plugin_flf_histotag_geosupport_1'] = 'checked="checked"'; break; } if ($superCage->post->keyExists('plugin_flf_histotag_imagesource') == TRUE && $superCage->post->getInt('plugin_flf_histotag_imagesource') != $CONFIG['plugin_flf_histotag_imagesource']) { $CONFIG['plugin_flf_histotag_imagesource'] = $superCage->post->getInt('plugin_flf_histotag_imagesource'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_imagesource']}' WHERE name='plugin_flf_histotag_imagesource'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } switch ($CONFIG['plugin_flf_histotag_imagesource']) { case 1: $option_output['plugin_flf_histotag_imagesource_2'] = ''; $option_output['plugin_flf_histotag_imagesource_3'] = ''; $option_output['plugin_flf_histotag_imagesource_1'] = 'checked="checked"'; break; case 2: $option_output['plugin_flf_histotag_imagesource_1'] = ''; $option_output['plugin_flf_histotag_imagesource_3'] = ''; $option_output['plugin_flf_histotag_imagesource_2'] = 'checked="checked"'; break; case 3: $option_output['plugin_flf_histotag_imagesource_2'] = ''; $option_output['plugin_flf_histotag_imagesource_1'] = ''; $option_output['plugin_flf_histotag_imagesource_3'] = 'checked="checked"'; break; default: $option_output['plugin_flf_histotag_imagesource_2'] = ''; $option_output['plugin_flf_histotag_imagesource_3'] = ''; $option_output['plugin_flf_histotag_imagesource_1'] = 'checked="checked"'; break; } if ($superCage->post->keyExists('plugin_flf_histotag_histosupport') == TRUE && $superCage->post->getInt('plugin_flf_histotag_histosupport') != $CONFIG['plugin_flf_histotag_histosupport']) { $CONFIG['plugin_flf_histotag_histosupport'] = $superCage->post->getInt('plugin_flf_histotag_histosupport'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_histosupport']}' WHERE name='plugin_flf_histotag_histosupport'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } switch ($CONFIG['plugin_flf_histotag_histosupport']) { case 1: $option_output['plugin_flf_histotag_histosupport_2'] = ''; $option_output['plugin_flf_histotag_histosupport_3'] = ''; $option_output['plugin_flf_histotag_histosupport_4'] = ''; $option_output['plugin_flf_histotag_histosupport_1'] = 'checked="checked"'; break; case 2: $option_output['plugin_flf_histotag_histosupport_1'] = ''; $option_output['plugin_flf_histotag_histosupport_3'] = ''; $option_output['plugin_flf_histotag_histosupport_4'] = ''; $option_output['plugin_flf_histotag_histosupport_2'] = 'checked="checked"'; break; case 3: $option_output['plugin_flf_histotag_histosupport_1'] = ''; $option_output['plugin_flf_histotag_histosupport_2'] = ''; $option_output['plugin_flf_histotag_histosupport_4'] = ''; $option_output['plugin_flf_histotag_histosupport_3'] = 'checked="checked"'; break; case 4: $option_output['plugin_flf_histotag_histosupport_1'] = ''; $option_output['plugin_flf_histotag_histosupport_2'] = ''; $option_output['plugin_flf_histotag_histosupport_3'] = ''; $option_output['plugin_flf_histotag_histosupport_4'] = 'checked="checked"'; break; default: $option_output['plugin_flf_histotag_histosupport_2'] = ''; $option_output['plugin_flf_histotag_histosupport_3'] = ''; $option_output['plugin_flf_histotag_histosupport_4'] = ''; $option_output['plugin_flf_histotag_histosupport_1'] = 'checked="checked"'; break; } // UseHistogram function upon upload of images if ($superCage->post->keyExists('plugin_flf_histotag_createonupload') == TRUE && $superCage->post->getInt('plugin_flf_histotag_createonupload') == 1) { $temp = 1; } elseif ($superCage->post->keyExists('submit') == TRUE) { $temp = 0; } else { $temp = $CONFIG['plugin_flf_histotag_createonupload']; } if ($CONFIG['plugin_flf_histotag_createonupload'] != $temp) { $CONFIG['plugin_flf_histotag_createonupload'] = $temp; $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_createonupload']}' WHERE name='plugin_flf_histotag_createonupload'"; cpg_db_query($query); $config_changes_counter++; } if ($CONFIG['plugin_flf_histotag_createonupload'] == '1') { $option_output['plugin_flf_histotag_createonupload'] = 'checked="checked"'; } if ($superCage->post->keyExists('plugin_flf_histotag_histotype') == TRUE && $superCage->post->getInt('plugin_flf_histotag_histotype') != $CONFIG['plugin_flf_histotag_histotype']) { $CONFIG['plugin_flf_histotag_histotype'] = $superCage->post->getInt('plugin_flf_histotag_histotype'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_histotype']}' WHERE name='plugin_flf_histotag_histotype'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } if ($CONFIG['plugin_flf_histotag_histotype'] == '2') { $option_output['plugin_flf_histotag_histotype_combined'] = ''; $option_output['plugin_flf_histotag_histotype_separate'] = 'checked="checked"'; } else { // default is "combined" $option_output['plugin_flf_histotag_histotype_combined'] = 'checked="checked"'; $option_output['plugin_flf_histotag_histotype_separate'] = ''; } // Histogram Box Width if ($superCage->post->keyExists('plugin_flf_histotag_histoboxwidth') == TRUE) { if ($superCage->post->getInt('plugin_flf_histotag_histoboxwidth') >= 0 && $superCage->post->getInt('plugin_flf_histotag_histoboxwidth') <= 1280 && $CONFIG['plugin_flf_histotag_histoboxwidth'] != $superCage->post->getInt('plugin_flf_histotag_histoboxwidth')) { $CONFIG['plugin_flf_histotag_histoboxwidth'] = $superCage->post->getInt('plugin_flf_histotag_histoboxwidth'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_histoboxwidth']}' WHERE name='plugin_flf_histotag_histoboxwidth'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } // Histogram Box Height if ($superCage->post->keyExists('plugin_flf_histotag_histoboxheight') == TRUE) { if ($superCage->post->getInt('plugin_flf_histotag_histoboxheight') >= 0 && $superCage->post->getInt('plugin_flf_histotag_histoboxheight') <= 1024 && $CONFIG['plugin_flf_histotag_histoboxheight'] != $superCage->post->getInt('plugin_flf_histotag_histoboxheight')) { $CONFIG['plugin_flf_histotag_histoboxheight'] = $superCage->post->getInt('plugin_flf_histotag_histoboxheight'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_histoboxheight']}' WHERE name='plugin_flf_histotag_histoboxheight'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } // Histogram Width if ($superCage->post->keyExists('plugin_flf_histotag_histowidth') == TRUE) { if ($superCage->post->getInt('plugin_flf_histotag_histowidth') >= 0 && $superCage->post->getInt('plugin_flf_histotag_histowidth') <= 1024 && $CONFIG['plugin_flf_histotag_histowidth'] != $superCage->post->getInt('plugin_flf_histotag_histowidth')) { $CONFIG['plugin_flf_histotag_histowidth'] = $superCage->post->getInt('plugin_flf_histotag_histowidth'); $query = "UPDATE {$CONFIG['TABLE_CONFIG']} SET value='{$CONFIG['plugin_flf_histotag_histowidth']}' WHERE name='plugin_flf_histotag_histowidth'"; cpg_db_query($query); $config_changes_counter++; $dump_cache++; } } // Form submit? if ($superCage->post->keyExists('submit') == TRUE) { if ($config_changes_counter > 0) { $additional_submit_information = '<div class="cpg_message_success">' . $flf_lang_var['changes_saved'] . '</div>'; } else { $additional_submit_information = '<div class="cpg_message_validation">' . $flf_lang_var['no_changes'] . '</div>'; } } // TODO: Create the table row that is displayed during initial install $install_section = ''; // Start the actual output echo <<<EOT <style type="text/css" media="screen"> .farbtastic { position: relative; } .farbtastic * { position: absolute; cursor: crosshair; } .farbtastic, .farbtastic .wheel { width: 195px; height: 195px; } .farbtastic .color, .farbtastic .overlay { top: 47px; left: 47px; width: 101px; height: 101px; } .farbtastic .wheel { background: url(plugins/flf_histotag/images/wheel.png) no-repeat; width: 195px; height: 195px; } .farbtastic .overlay { background: url(plugins/flf_histotag/images/mask.png) no-repeat; } .farbtastic .marker { width: 17px; height: 17px; margin: -8px 0 0 -8px; overflow: hidden; background: url(plugins/flf_histotag/images/marker.png) no-repeat; } </style> <script type="text/javascript"> \$(document).ready(function() { \$('#colorpicker_bgcolor').farbtastic('#plugin_flf_histotag_histocolor'); \$("#plugin_flf_histotag_histoquality").SpinButton({min: 0,max: 100}); \$("#plugin_flf_histotag_mapwidth").SpinButton({min: 200,max: 1280}); \$("#plugin_flf_histotag_mapheight").SpinButton({min:100,max: 1024}); \$("#plugin_flf_histotag_mapboxwidth").SpinButton({min: 200,max: 1280}); \$("#plugin_flf_histotag_mapboxheight").SpinButton({min:100,max: 1024}); \$("#plugin_flf_histotag_histoboxwidth").SpinButton({min: 100,max: 1280}); \$("#plugin_flf_histotag_histoboxheight").SpinButton({min:100,max: 1024}); \$("#plugin_flf_histotag_histowidth").SpinButton({min:256,max: 1024}); }); </script> <form action="" method="post" name="thumb_rotate_config" id="thumb_rotate_config"> EOT; starttable('100%', $thumb_rotate_icon_array['config'] . $flf_lang_var['config'], 2); echo <<<EOT <tr> <td valign="top" class ="tableh1"> {$flf_lang_var['configure_geo']} </td> </tr> <tr> <td valign="top" class="tableb tableb_alternate"> {$flf_lang_var['geosupport']} </td> <td valign="top" class="tableb tableb_alternate"> <input type="radio" name="plugin_flf_histotag_geosupport" id="plugin_flf_histotag_geosupport_1" class="checkbox" value="1" {$option_output['plugin_flf_histotag_geosupport_1']} /> <label for="plugin_flf_histotag_geosupport_1"> {$flf_lang_var['geosupport_1']}</label> <br /> <input type="radio" name="plugin_flf_histotag_geosupport" id="plugin_flf_histotag_geosupport_2" class="checkbox" value="2" {$option_output['plugin_flf_histotag_geosupport_2']} /> <label for="plugin_flf_histotag_geosupport_2"> {$flf_lang_var['geosupport_2']}</label> <br /> <input type="radio" name="plugin_flf_histotag_geosupport" id="plugin_flf_histotag_geosupport_3" class="checkbox" value="3" {$option_output['plugin_flf_histotag_geosupport_3']} /> <label for="plugin_flf_histotag_geosupport_3"> {$flf_lang_var['geosupport_3']}</label> <br /> </td> </tr> <tr> <td valign="top" class="tableb tableb_alternate"> {$flf_lang_var['maptype']} </td> <td valign="top" class="tableb tableb_alternate"> <input type="radio" name="plugin_flf_histotag_mapmode" id="plugin_flf_histotag_mapmode_1" class="checkbox" value="1" {$option_output['plugin_flf_histotag_mapmode_1']} /> <label for="plugin_flf_histotag_mapmode_1"> {$flf_lang_var['maptype_1']}</label> <br /> <input type="radio" name="plugin_flf_histotag_mapmode" id="plugin_flf_histotag_mapmode_2" class="checkbox" value="2" {$option_output['plugin_flf_histotag_mapmode_2']} /> <label for="plugin_flf_histotag_mapmode_2"> {$flf_lang_var['maptype_2']}</label> <br /> <input type="radio" name="plugin_flf_histotag_mapmode" id="plugin_flf_histotag_mapmode_3" class="checkbox" value="3" {$option_output['plugin_flf_histotag_mapmode_3']} /> <label for="plugin_flf_histotag_mapmode_3"> {$flf_lang_var['maptype_3']}</label> <br /> <input type="radio" name="plugin_flf_histotag_mapmode" id="plugin_flf_histotag_mapmode_4" class="checkbox" value="4" {$option_output['plugin_flf_histotag_mapmode_4']} /> <label for="plugin_flf_histotag_mapmode_4"> {$flf_lang_var['maptype_4']}</label> <br /> <input type="radio" name="plugin_flf_histotag_mapmode" id="plugin_flf_histotag_mapmode_5" class="checkbox" value="5" {$option_output['plugin_flf_histotag_mapmode_5']} /> <label for="plugin_flf_histotag_mapmode_5"> {$flf_lang_var['maptype_5']}</label> </td> </tr> <tr> <td valign="top" class ="tableb"> {$flf_lang_var['configmap']} </td> </tr> <td valign="top" class="tableb"> {$flf_lang_var['mapwidth']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_mapwidth" id="plugin_flf_histotag_mapwidth" class="textinput spin-button" size="4" maxlength="4" value="{$CONFIG['plugin_flf_histotag_mapwidth']}" /> px </td> </tr> <tr> <td valign="top" class="tableb"> {$flf_lang_var['mapheight']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_mapheight" id="plugin_flf_histotag_mapheight" class="textinput spin-button" size="4" maxlength="4" value="{$CONFIG['plugin_flf_histotag_mapheight']}" /> px <br /> <br /> </td> </tr> <tr> <td valign="top" class ="tableb"> {$flf_lang_var['configmapbox']} </td> </tr> <tr> <td valign="top" class="tableb"> {$flf_lang_var['mapwidth']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_mapboxwidth" id="plugin_flf_histotag_mapboxwidth" class="textinput spin-button" size="4" maxlength="4" value="{$CONFIG['plugin_flf_histotag_mapboxwidth']}" /> px </td> </tr> <tr> <td valign="top" class="tableb"> {$flf_lang_var['mapheight']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_mapboxheight" id="plugin_flf_histotag_mapboxheight" class="textinput spin-button" size="4" maxlength="4" value="{$CONFIG['plugin_flf_histotag_mapboxheight']}" /> px <br /> <br /> </td> </tr> <tr> <td valign="top" class="tableb"> {$flf_lang_var['setapi']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_apikey" id="plugin_flf_histotag_apikey" class="textinput" size="50" maxlength="200" value="{$CONFIG['plugin_flf_histotag_apikey']}" /> <br /> <br /> </td> </tr> <tr> <td valign="top" class ="tableh1"> <br> {$flf_lang_var['configure_histo']} <br> </td> </tr> <tr> <td valign="top" class="tableb tableb_alternate"> {$flf_lang_var['histosupport']} </td> <td valign="top" class="tableb tableb_alternate"> <input type="radio" name="plugin_flf_histotag_histosupport" id="plugin_flf_histotag_histosupport_1" class="checkbox" value="1" {$option_output['plugin_flf_histotag_histosupport_1']} /> <label for="plugin_flf_histotag_histosupport_1"> {$flf_lang_var['histosupport_1']}</label> <br /> <input type="radio" name="plugin_flf_histotag_histosupport" id="plugin_flf_histotag_histosupport_2" class="checkbox" value="2" {$option_output['plugin_flf_histotag_histosupport_2']} /> <label for="plugin_flf_histotag_histosupport_2"> {$flf_lang_var['histosupport_2']}</label> <br /> <input type="radio" name="plugin_flf_histotag_histosupport" id="plugin_flf_histotag_histosupport_3" class="checkbox" value="3" {$option_output['plugin_flf_histotag_histosupport_3']} /> <label for="plugin_flf_histotag_histosupport_3"> {$flf_lang_var['histosupport_3']}</label> <br /> <input type="radio" name="plugin_flf_histotag_histosupport" id="plugin_flf_histotag_histosupport_4" class="checkbox" value="4" {$option_output['plugin_flf_histotag_histosupport_4']} /> <label for="plugin_flf_histotag_histosupport_4"> {$flf_lang_var['histosupport_4']}</label> <br /> </td> </tr> <tr> <td valign="top" class="tableb tableb_alternate"> {$flf_lang_var['imagesource']} </td> <td valign="top" class="tableb tableb_alternate"> <input type="radio" name="plugin_flf_histotag_imagesource" id="plugin_flf_histotag_imagesource_1" class="checkbox" value="1" {$option_output['plugin_flf_histotag_imagesource_1']} /> <label for="plugin_flf_histotag_imagesource_1"> {$flf_lang_var['imagesource_1']}</label> <br /> <input type="radio" name="plugin_flf_histotag_imagesource" id="plugin_flf_histotag_imagesource_2" class="checkbox" value="2" {$option_output['plugin_flf_histotag_imagesource_2']} /> <label for="plugin_flf_histotag_imagesource_2"> {$flf_lang_var['imagesource_2']}</label> <br /> <input type="radio" name="plugin_flf_histotag_imagesource" id="plugin_flf_histotag_imagesource_3" class="checkbox" value="3" {$option_output['plugin_flf_histotag_imagesource_3']} /> <label for="plugin_flf_histotag_imagesource_3"> {$flf_lang_var['imagesource_3']}</label> <br /> </td> </tr> <tr> <td valign="top" class="tableb tableb_alternate"> {$flf_lang_var['createonupload']} </td> <td valign="top" class="tableb tableb_alternate"> <input type="checkbox" name="plugin_flf_histotag_createonupload" id="plugin_flf_histotag_createonupload" class="checkbox" value="1" {$option_output['plugin_flf_histotag_createonupload']} /> {$flf_lang_var['activated']} </td> </tr> <tr> <td valign="top" class="tableb tableb_alternate"> {$flf_lang_var['histcol']} </td> <td valign="top" class="tableb tableb_alternate"> <input type="text" name="plugin_flf_histotag_histocolor" id="plugin_flf_histotag_histocolor" class="textinput" size="8" maxlength="7" value="{$CONFIG['plugin_flf_histotag_histocolor']}" style="text-transform:uppercase;" /> <span class="detail_head_collapsed">{$flf_lang_var['toggle_color_picker']}</span> <div id="colorpicker_bgcolor" class="detail_body"></div> </td> </tr> <tr> <td valign="top" class="tableb"> {$flf_lang_var['histo_quality']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_histoquality" id="plugin_flf_histotag_histoquality" class="textinput spin-button" size="3" maxlength="3" value="{$CONFIG['plugin_flf_histotag_histoquality']}" /> % <br /> <br /> </td> </tr> <tr> <td valign="top" class="tableb tableb_alternate"> {$flf_lang_var['histtype']} </td> <td valign="top" class="tableb tableb_alternate"> <input type="radio" name="plugin_flf_histotag_histotype" id="plugin_flf_histotag_histotype_combined" class="checkbox" value="1" {$option_output['plugin_flf_histotag_histotype_combined']} /> <label for="plugin_flf_histotag_histotype_combined"> ({$flf_lang_var['histo_type_combined']})</label> <br /> <input type="radio" name="plugin_flf_histotag_histotype" id="plugin_flf_histotag_histotype_separate" class="checkbox" value="2" {$option_output['plugin_flf_histotag_histotype_separate']} /> <label for="plugin_flf_histotag_histotype_separate"> ({$flf_lang_var['histo_type_separate']})</label> </td> </tr> <tr> <td valign="top" class="tableb"> {$flf_lang_var['histowidth']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_histowidth" id="plugin_flf_histotag_histowidth" class="textinput spin-button" size="4" maxlength="4" value="{$CONFIG['plugin_flf_histotag_histowidth']}" /> px <br /> <br /> </td> </tr> <tr> <td valign="top" class ="tableb"> {$flf_lang_var['configmapbox']} </td> </tr> <tr> <td valign="top" class="tableb"> {$flf_lang_var['mapwidth']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_histoboxwidth" id="plugin_flf_histotag_histoboxwidth" class="textinput spin-button" size="4" maxlength="4" value="{$CONFIG['plugin_flf_histotag_histoboxwidth']}" /> px </td> </tr> <tr> <td valign="top" class="tableb"> {$flf_lang_var['mapheight']} </td> <td valign="top" class="tableb"> <input type="text" name="plugin_flf_histotag_histoboxheight" id="plugin_flf_histotag_histoboxheight" class="textinput spin-button" size="4" maxlength="4" value="{$CONFIG['plugin_flf_histotag_histoboxheight']}" /> px <br /> <br /> </td> </tr> {$install_section} <tr> <td valign="middle" class="tablef"> </td> <td valign="middle" class="tablef"> <button type="submit" class="button" name="submit" value="{$lang_common['ok']}">{$thumb_rotate_icon_array['ok']}{$lang_common['ok']}</button> </td> </tr> EOT; endtable(); echo <<<EOT {$additional_submit_information} </form> EOT; }
EOT; pagefooter(); } function countup($array) { $result = 0; foreach ($array as $a) { $result += is_array($a) ? countup($a) : count($a); } return $result; } pageheader($lang_plugin_mass_import['name']); echo <<<EOT <form name="form" method="POST" action="{$scriptname}"> EOT; starttable('100%', $mass_import_icon_array['table'] . $lang_plugin_mass_import['name'], 2, 'cpg_zebra'); $post_directory = $superCage->post->getRaw('directory'); if ($superCage->post->keyExists('filelist')) { $filelist = unserialize(base64_decode($superCage->post->getRaw('filelist'))); // We rely on the fact that only the admin can use this page in the first place $counter = 0; //echo '<br />'; populatealbums(); } elseif ($superCage->post->keyExists('start')) { $data = dir_parse('./' . $CONFIG['fullpath'] . trim($post_directory)); if (!$superCage->post->keyExists('directory')) { echo $output_array['row_start'] . $lang_plugin_mass_import['root_use'] . $output_array['row_separator'] . $output_array['row_end']; $parent = 0; } else { $sql = "SELECT cid " . "FROM {$CONFIG['TABLE_CATEGORIES']} " . "WHERE parent='0' AND name='" . $post_directory . "' " . "LIMIT 1"; $result = $db_query_wrapper($sql);
<?php // ------------------------------------------------------------------------- // // Coppermine Photo Gallery 1.3.2 // // ------------------------------------------------------------------------- // // Copyright (C) 2002-2004 Gregory DEMAR // // http://www.chezgreg.net/coppermine/ // // ------------------------------------------------------------------------- // // Updated by the Coppermine Dev Team // // (http://coppermine.sf.net/team/) // // see /docs/credits.html for details // // ------------------------------------------------------------------------- // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // ------------------------------------------------------------------------- // // CVS version: $Id: anycontent.php,v 1.3 2004/08/24 20:49:03 joestewart Exp $ // ------------------------------------------------------------------------- // starttable("100%", "Welcome"); ?> <tr><td class="tableb" > This is for any content block - just a test - Edit the file "anycontent.php" to change what is shown here </td></tr> <?php endtable();
$displayOption_array['no_modification_check'] = 1; $optionDisplayOutput_array['no_modification_check'] = 'checked="checked"'; } else { $displayOption_array['no_modification_check'] = 0; } // Sanitize the GET vars and populate the optionsArray --- end // Connect to the repository if ($displayOption_array['output'] != 'options') { $file_data_array = cpgVersioncheckConnectRepository(); $file_data_array = cpg_versioncheckPopulateArray($file_data_array); $file_data_count = count($file_data_array); } // main code starts here $title_help = ' ' . cpg_display_help('f=upgrading.htm&as=versioncheck&ae=versioncheck_end', '600', '400'); pageheader($lang_versioncheck_php['title']); starttable('100%', cpg_fetch_icon('check_versions', 2) . $lang_versioncheck_php['title'] . $title_help, 1); //print '<h1>' . cpg_fetch_icon('check_versions', 2) . $lang_versioncheck_php['title']. $title_help . '</h1>'; // Print options if applicable if ($displayOption_array['output'] == 'options' || $displayOption_array['output'] == 'screen' || $displayOption_array['output'] == 'textarea') { print <<<EOT <tr> <td class="tableb"> EOT; cpg_versioncheckDisplayOptions(); print <<<EOT </td> </tr> EOT; } if ($displayOption_array['output'] == 'create') { // create data
?> </script> <?php //} // print the javascript bit that updates the parent element --- end ?> </head> <body class="tableb" scroll="auto" marginwidth="0" marginheight="0"> <form name="childform" id="childform" method="get" action="<?php print $CPG_PHP_SELF; ?> " onsubmit="return updateParent();"> <?php //print $_SERVER["REQUEST_URI"]; starttable(-2, $lang_minibrowser_php['select_directory'], 2); if (!GALLERY_ADMIN_MODE) { cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__); } $base_folder = rtrim(cpg_get_webroot_path(), '/') . '/'; //print "basefolder: ".$base_folder; $dir = opendir($base_folder . $folder); // read the folder/file structure we're currently in and put it into an array $dirCounter = 0; while ($file = readdir($dir)) { if (is_dir($base_folder . $folder . $file)) { if (is_array($hiddenfolders)) { if (in_array($file, $hiddenfolders) == false) { $foldername[] = $file; $dirCounter++; }
function update_history($html) { $superCage = Inspekt::makeSuperCage(); global $CONFIG, $matches, $cat, $USER_DATA, $FORBIDDEN_SET; global $lang_plugin_update_history, $lastup_date_fmt; require 'plugins/update_history/include/init.inc.php'; $CONFIG['TABLE_UPDATE_HISTORY_CONFIG'] = $CONFIG['TABLE_PREFIX'] . 'update_history_config'; $Group_Id = $USER_DATA['groups'][0]; $result = cpg_db_query("select * FROM {$CONFIG['TABLE_UPDATE_HISTORY_CONFIG']} WHERE Group_Id={$Group_Id}"); $param = mysql_fetch_array($result); //settings $GID = $param['Group_Id']; $bloc = $param['bloc']; $archive = $param['archive']; $uploader_name = $param['uploader_name']; $days = $param['days']; if ($superCage->get->keyExists('cat')) { $cat = $superCage->get->getInt('cat'); } else { $cat = ''; } $nb = intval($param['number']); $end = time(); $counter = array(); $info = array(); $FORBIDDEN_SET_UPD = $FORBIDDEN_SET ? "AND {$FORBIDDEN_SET}" : ''; $CAT_FILTER = $cat ? "AND a.category = {$cat}" : ''; //if $bloc set to 1 display the block if ($matches[1] != 'updatehistory' || !$bloc == "1") { return $matches; } //if GALLERY_ADMIN_MODE, display button to plugin admin page if (GALLERY_ADMIN_MODE) { //if $archive set to 1, button displayed to acces to the plugin archive page if ($archive == "1") { $bloc_title = $lang_plugin_update_history['update'] . " <a class=\"admin_menu\" href=\"index.php?file=update_history/history_archive\">{$lang_plugin_update_history[archive]}</a> <a class=\"admin_menu\" href=\"index.php?file=update_history/history_admin\">{$lang_plugin_update_history[admin]}</a>"; } else { $bloc_title = $lang_plugin_update_history['update'] . " <a class=\"admin_menu\" href=\"index.php?file=update_history/history_admin\">{$lang_plugin_update_history[admin]}</a>"; } } else { if ($archive == "1") { $bloc_title = $lang_plugin_update_history['update'] . " <a class=\"admin_menu\" href=\"index.php?file=update_history/history_archive\">{$lang_plugin_update_history[archive]}</a>"; } else { $bloc_title = $lang_plugin_update_history['update']; } } //display update history bloc starttable("100%", $bloc_title); //If $days set to 1 show the last uploads since the $nb last days (default setting) if ($days == "1") { echo '<tr><td class="tableh2"><b>' . $lang_plugin_update_history['history'] . $nb . $lang_plugin_update_history['last_days'] . '</b></td></tr>'; for ($d = 0; $d < $nb; $d++) { $start = strtotime(date("Ymd")) - $d * 60 * 60 * 24; $result = cpg_db_query("SELECT *,a.title AS album_title,p.owner_id AS owner FROM {$CONFIG['TABLE_PICTURES']} AS p,{$CONFIG['TABLE_ALBUMS']} AS a WHERE (APPROVED ='YES') AND (p.aid = a.aid) AND (ctime BETWEEN {$start} AND {$end}) {$FORBIDDEN_SET_UPD} {$CAT_FILTER} ORDER BY ctime DESC"); while ($row = mysql_fetch_assoc($result)) { $day = localised_date($row['ctime'], $plugin_update_history_date_fmt); //$day = ($day, $lastup_date_fmt); $counter[$day][$row[album_title]] += 1; $info[$day][$row[album_title]] = $row; $users[$day][$row[album_title]][] = $row['owner']; } $end = $start; } $i = 0; $test = array_keys($counter); foreach ($counter as $day) { foreach ($day as $album => $number) { $date = $test[$i]; $album_info = $info[$date][$album]; if ($number == 1) { echo '<tr><td class="tableb">' . $date . ": {$number}" . $lang_plugin_update_history['new'] . "<a href=\"thumbnails.php?album={$album_info['aid']}\">{$album}</a>"; } else { echo '<tr><td class="tableb">' . $date . ": {$number}" . $lang_plugin_update_history['news'] . "<a href=\"thumbnails.php?album={$album_info['aid']}\">{$album}</a>"; } $links = array(); foreach ($users[$date][$album] as $u) { if ($uploader_name == 1) { //show the uploader name if $uploader_name set to 1 if ($u > 0) { $links[] = $lang_plugin_update_history['by'] . "<a href=\"profile.php?uid={$u}\">" . get_username($u) . "</a>"; } } } $out = array_unique($links); echo implode(', ', $out); echo "</td></tr>"; } $i++; } } else { //otheerway Show n last uploaded files according settings $limit = $nb; echo '<tr><td class="tableh2"><b>' . $lang_plugin_update_history['history'] . $nb . $lang_plugin_update_history_admin['uploaded_files'] . '</b></td></tr>'; $result = cpg_db_query("SELECT *,a.title AS album_title,p.owner_id AS owner FROM {$CONFIG['TABLE_PICTURES']} AS p,{$CONFIG['TABLE_ALBUMS']} AS a WHERE (APPROVED ='YES') AND (p.aid = a.aid) {$FORBIDDEN_SET_UPD} {$CAT_FILTER} ORDER BY ctime DESC LIMIT {$nb}"); for ($d = 0; $d < $nb; $d++) { while ($row = mysql_fetch_assoc($result)) { $day = localised_date($row['ctime'], $plugin_update_history_date_fmt); $album = $row['album_title']; $thumb = $CONFIG['fullpath'] . "/" . $row['filepath'] . "/" . $CONFIG['thumb_pfx'] . $row['filename']; echo '<tr><td class="tableb">' . $day . ": <a href=\"displayimage.php?pos=-{$row['pid']}\"><img border=\"1\" width=\"{$CONFIG['alb_list_thumb_size']}\" src=\"{$thumb}\" alt=\"{$row['filename']}\" title=\"{$row['filename']}\"/></a>" . $lang_plugin_update_history['add'] . "<a href=\"thumbnails.php?album={$row['aid']}\">{$album}</a>"; if ($uploader_name == 1) { //show the uploader name if $uploader_name set to 1 $links[] = $lang_plugin_update_history['by'] . "<a href=\"profile.php?uid={$u}\">" . get_username($row['owner']) . "</a>"; } $out = array_unique($links); echo implode(', ', $out); echo "</td></tr>"; } } } endtable(); mysql_free_result($result); }
function display_plugin_list() { global $CPG_PLUGINS, $lang_pluginmgr_php, $lang_plugin_php, $lang_common, $CONFIG, $CPG_PHP_SELF; list($timestamp, $form_token) = getFormToken(); $help = ' ' . cpg_display_help('f=plugins.htm&as=plugin_manager&ae=plugin_manager_end&top=1', '800', '600'); $help_plugin_enable = cpg_display_help('f=configuration.htm&as=admin_general_enable-plugins&ae=admin_general_enable-plugins_end', 400, 300); // configure plugin api (enabled or disabled) $yes_selected = $CONFIG['enable_plugins'] ? 'checked="checked"' : ''; $no_selected = !$CONFIG['enable_plugins'] ? 'checked="checked"' : ''; print '<form name="pluginenableconfig" id="cpgform2" action="' . $CPG_PHP_SELF . '" method="post" style="margin:0px;padding:0px">'; starttable('-1', cpg_fetch_icon('plugin_mgr', 2) . $lang_pluginmgr_php['pmgr'] . $help, 3); echo <<<EOT <tr> <td class="tableh2" colspan="3"> {$lang_pluginmgr_php['explanation']} </td> </tr> <tr> <td class="tableb"> {$lang_pluginmgr_php['plugin_enabled']} </td> <td class="tableb"> <input type="radio" id="enable_plugins1" name="enable_plugins" value="1" onclick="document.pluginenableconfig.submit();" {$yes_selected} class="radio" /><label for="enable_plugins1" class="clickable_option">{$lang_common['yes']}</label> <input type="radio" id="enable_plugins0" name="enable_plugins" value="0" onclick="document.pluginenableconfig.submit();" {$no_selected} class="radio" /><label for="enable_plugins0" class="clickable_option">{$lang_common['no']}</label> <input type="hidden" name="update_config" value="1" /> <input type="hidden" name="form_token" value="{$form_token}" /> <input type="hidden" name="timestamp" value="{$timestamp}" /> </td> <td class="tableb"> {$help_plugin_enable} </td> </tr> EOT; endtable(); print '</form>'; echo <<<EOT <br /> EOT; $help = ' ' . cpg_display_help('f=plugins.htm&as=plugin_manager_uninstall&ae=plugin_manager_uninstall_end&top=1', '640', '480'); $available_plugins = cpg_get_dir_list('./plugins/'); starttable('100%'); echo <<<EOT <tr> <td class="tableh1" width="90%"><strong><span class="statlink">{$lang_pluginmgr_php['i_plugins']}</span></strong></td> <td colspan="3" class="tableh1" align="center" width="10%"><strong><span class="statlink">{$lang_pluginmgr_php['operation']}</span></strong>{$help}</td> </tr> EOT; unset($installed_plugins); if ($CONFIG['enable_plugins'] == 1) { $loop_counter = 0; foreach ($CPG_PLUGINS as $thisplugin) { $installed_plugins[$loop_counter] = array('index' => $thisplugin->index, 'plugin_id' => $thisplugin->plugin_id, 'path' => $thisplugin->path, 'priority' => $thisplugin->priority, 'error' => $thisplugin->error); $loop_counter++; } } else { // If plugin system is turned off, grab installed plugins from database table $query = 'SELECT * FROM ' . $CONFIG['TABLE_PLUGINS'] . ' ORDER BY priority ASC;'; $result = cpg_db_query($query); $loop_counter = 0; while ($installed_plugin = mysql_fetch_assoc($result)) { $installed_plugins[$loop_counter] = array('index' => $loop_counter, 'plugin_id' => $installed_plugin['plugin_id'], 'path' => $installed_plugin['path'], 'priority' => $installed_plugin['priority'], 'error' => array()); $loop_counter++; } } $installed_count = 0; $loop_counter = 0; if (isset($installed_plugins) == TRUE) { $plugins_count = count($installed_plugins); foreach ($installed_plugins as $thisplugin) { $installed_count++; unset($extra_info); unset($install_info); include './plugins/' . $thisplugin['path'] . '/configuration.php'; $pluginPath = $thisplugin['path']; $safename = addslashes(str_replace(' ', '', $name)); if (isset($extra_info) == TRUE) { $extra = $extra_info; } else { $extra = ''; } if (sizeof($thisplugin['error']) > 0) { $error = $thisplugin['error']['desc']; $extra = '<tr><td class="tableb" width="100%" colspan="2">' . '<strong>' . $lang_common['error'] . ':</strong> <span style="color:red;">' . $error . '</span>' . '</td></tr>' . $extra; } if ($loop_counter == 0) { $row_style_class = 'tableb'; } else { $row_style_class = 'tableb tableb_alternate'; } $loop_counter++; if ($loop_counter > 1) { $loop_counter = 0; } echo <<<EOT <tr> <td width="90%" class="{$row_style_class}"> <a name="{$pluginPath}"></a> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="maintable"> <tr> <td colspan="2" class="tableh1">{$name} ({$pluginPath}): {$lang_pluginmgr_php['vers']}{$version}</td> </tr> <tr> <td class="tableb" valign="top">{$lang_pluginmgr_php['author']}:</td> <td class="tableb" valign="top">{$author}</td> </tr> <tr> <td class="tableb tableb_alternate" valign="top">{$lang_pluginmgr_php['desc']}</td> <td class="tableb tableb_alternate" valign="top">{$description}</td> </tr> EOT; if ($extra != '') { echo <<<EOT <tr> <td class="tableb" width="20%" valign="top">{$lang_pluginmgr_php['extra']}:</td> <td class="tableb" valign="top">{$extra}</td> </tr> EOT; } echo <<<EOT </table> </td> <td class="{$row_style_class}" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> EOT; if ($thisplugin['index'] > 0 && $plugins_count > 1) { $up = cpg_fetch_icon('up', 0); echo <<<EOT <td width="3%" align="center" valign="middle"> <a href="pluginmgr.php?op=moveu&p={$thisplugin['plugin_id']}&form_token={$form_token}&timestamp={$timestamp}#{$pluginPath}">{$up}</a> </td> EOT; } else { echo '<td width="3%"></td>'; } if ($thisplugin['index'] < $plugins_count - 1) { $down = cpg_fetch_icon('down', 0); echo <<<EOT <td width="3%" align="center" valign="middle"> <a href="pluginmgr.php?op=moved&p={$thisplugin['plugin_id']}&form_token={$form_token}&timestamp={$timestamp}#{$pluginPath}">{$down}</a> </td> EOT; } else { echo '<td width="3%"></td>'; } $confirm_function = $CONFIG['enable_plugins'] == 1 ? 'confirmUninstall' : 'confirmRemove'; $delete = cpg_fetch_icon('plugin_uninstall', 0); echo <<<EOT <td width="3%" align="center" valign="middle"> <a href="pluginmgr.php?op=uninstall&p={$thisplugin['plugin_id']}&form_token={$form_token}&timestamp={$timestamp}" onclick="return {$confirm_function}('{$safename}')" title="{$lang_pluginmgr_php['uninstall']}"> {$delete} </a> </td> </tr> </table> </td> </tr> EOT; } } if ($installed_count == 0) { echo '<tr><td colspan="4" class="tableb" align="center">' . $lang_pluginmgr_php['none_installed'] . '</td></tr>'; } endtable(); echo '<p> </p>'; echo '<form name="cpgform" id="cpgform" action="pluginmgr.php?op=upload" method="post" enctype="multipart/form-data">'; $help_upload = ' ' . cpg_display_help('f=plugins.htm&as=plugin_manager_upload&ae=plugin_manager_upload_end&top=1', '640', '480'); $help_install = ' ' . cpg_display_help('f=plugins.htm&as=plugin_manager_install&ae=plugin_manager_install_end&top=1', '640', '480'); starttable('100%'); echo <<<EOT <tr> <td class="tableh1" width="90%"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left"> <strong><span class="statlink">{$lang_pluginmgr_php['n_plugins']}</span></strong>{$help_install} </td> <td align="right"> <input type="file" size="40" name="plugin" class="textinput" /> <input type="hidden" name="form_token" value="{$form_token}" /> <input type="hidden" name="timestamp" value="{$timestamp}" /> <input type="submit" class="button" value="{$lang_pluginmgr_php['upload']}" /> {$help_upload} </td> </tr> </table> </td> <td colspan="3" class="tableh1" align="center" width="10%"><strong><span class="statlink">{$lang_pluginmgr_php['operation']}</span></strong></td> </tr> EOT; $loop_counter = 0; // Note: CPGPluginAPI::installed() works even if Plugin API is disabled. foreach ($available_plugins as $path) { if (($plugin_id = CPGPluginAPI::installed($path)) === false) { // If codebase.php and configuration.php don't exist, skip this folder if (!(file_exists('./plugins/' . $path . '/codebase.php') && file_exists('./plugins/' . $path . '/configuration.php'))) { continue; } unset($extra_info); unset($install_info); include './plugins/' . $path . '/configuration.php'; $pluginPath = $path; $safename = addslashes(str_replace(' ', '', $name)); if (isset($install_info) == TRUE) { $extra = $install_info; } else { $extra = ''; } if ($loop_counter == 0) { $row_style_class = 'tableb'; } else { $row_style_class = 'tableb tableb_alternate'; } $loop_counter++; if ($loop_counter > 1) { $loop_counter = 0; } echo <<<EOT <tr> <td width="90%" class="{$row_style_class}"> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="maintable"> <tr> <td colspan="2" class="tableh1">{$name} ({$pluginPath}): {$lang_pluginmgr_php['vers']}{$version}</td> </tr> <tr> <td class="tableb tableb_alternate" width="20%" valign="top">{$lang_pluginmgr_php['author']}:</td> <td class="tableb tableb_alternate" valign="top">{$author}</td> </tr> <tr> <td class="tableb" valign="top">{$lang_pluginmgr_php['desc']}:</td> <td class="tableb" valign="top">{$description}</td> </tr> EOT; if ($extra != '') { echo <<<EOT <tr> <td class="tableb tableb_alternate" width="20%" valign="top">{$lang_pluginmgr_php['install_info']}:</td> <td class="tableb tableb_alternate" valign="top">{$extra}</td> </tr> EOT; } // Take care of version requirements if (isset($plugin_cpg_version['min']) == TRUE) { if (version_compare(COPPERMINE_VERSION, $plugin_cpg_version['min']) >= 0) { $plugin_cpg_version['min_ok'] = '1'; } else { $plugin_cpg_version['min_ok'] = '-1'; } } else { $plugin_cpg_version['min_ok'] = '0'; } if (isset($plugin_cpg_version['max']) == TRUE) { if (version_compare(COPPERMINE_VERSION, $plugin_cpg_version['max']) <= 0) { $plugin_cpg_version['max_ok'] = '1'; } else { $plugin_cpg_version['max_ok'] = '-1'; } } else { $plugin_cpg_version['max_ok'] = '0'; } if ($CONFIG['enable_plugins'] == 1) { if ($plugin_cpg_version['min_ok'] > 0 && $plugin_cpg_version['max_ok'] >= 0) { $install_button = '<a href="pluginmgr.php?op=install&p=' . $path . '&form_token=' . $form_token . '&timestamp=' . $timestamp . '" title="' . $lang_pluginmgr_php['install'] . '">' . cpg_fetch_icon('plugin_install', 0) . '</a>'; } elseif ($plugin_cpg_version['min_ok'] < 0 || $plugin_cpg_version['max_ok'] < 0) { if (isset($lang_pluginmgr_php['minimum_requirements_not_met']) != TRUE) { $lang_pluginmgr_php['minimum_requirements_not_met'] = 'Minimum requirements not met'; } $install_button = '<span title="' . $lang_pluginmgr_php['minimum_requirements_not_met'] . '">' . cpg_fetch_icon('cancel', 0) . '</span>'; } else { $install_button = '<a href="pluginmgr.php?op=install&p=' . $path . '&form_token=' . $form_token . '&timestamp=' . $timestamp . '" onclick="return confirmVersionMissing(\'' . $safename . '\')" title="' . $lang_pluginmgr_php['install'] . '" >' . cpg_fetch_icon('plugin_mgr', 0) . '</a>'; } } else { $install_button = cpg_fetch_icon('blank', 0); } unset($plugin_cpg_version); $delete = cpg_fetch_icon('delete', 0); echo <<<EOT </table> </td> <td class="{$row_style_class}" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="5%" align="center" valign="top"> </td> <td width="5%" align="center" valign="top"> {$install_button} </td> <td width="5%" align="center" valign="top"> <a href="pluginmgr.php?op=delete&p={$path}&form_token={$form_token}&timestamp={$timestamp}" onclick="return confirmDel('{$safename}')" title="{$lang_common['delete']}"> {$delete} </a> </td> </tr> </table> </td> </tr> EOT; } } endtable(); echo '</form>'; }
setcookie($CONFIG['cookie_name'] . '_filemove', base64_encode(serialize($filename)), 0, $CONFIG['cookie_path']); foreach ($filename as $n => $name) { echo $name . " "; } echo "</td></tr>"; echo "<tr><td class='tableh1' align='center'><b>{$lang_plugin_FileMove['folder_ar']}</b></td></tr>"; //choix du répertoire d'arrivée echo "<tr><td>"; list_dir($directory, 1, $dfolder, $selection, $selection1, $Drep); echo "</td></tr>"; endtable(); } else { starttable('100%', $lang_plugin_FileMove['display_name'] . ' - ' . $lang_plugin_FileMove['version'] . ' ' . '<a href="pluginmgr.php" class="admin_menu">Plugin Manager</a>', 2); //affichage du contenu du répertoire echo "<tr><td>"; $nb = 2; //Change this value according the column number you will display starttable('100%', $lang_plugin_FileMove['DFolder'] . $Drep, $nb); echo "<form name='file' action='' method='post'>"; echo "<tr>"; file_dir($dfolder, $nb); echo "<input type='hidden' name='dfolder' value='{$dfolder}'"; echo "<tr><td align='center' colspan='{$nb}'><input type='Submit' value='{$lang_plugin_FileMove['valid']}'></td></tr>"; echo "</tr></form>"; endtable(); echo "</td></tr>"; } //Fin de tableau endtable(); pagefooter(); ob_end_flush();
if (array_key_exists($superCage->post->getAlpha('time_limit'), $lang_plugin_limit_upload['upload_limit_values'])) { cpg_db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '" . $superCage->post->getAlpha('time_limit') . "' WHERE name = 'limit_upload_time_limit'"); } starttable("100%", $lang_common['information']); echo <<<EOT <tr> <td class="tableb" width="200"> {$lang_plugin_limit_upload['saved']} </td> </tr> EOT; endtable(); echo '<br />'; } echo '<form action="index.php?file=limit_upload/admin" method="post">'; starttable("100%", $lang_plugin_limit_upload['limit_upload'] . " - " . $lang_gallery_admin_menu['admin_lnk'], 3); $upload_limit = mysql_result(cpg_db_query("SELECT value FROM {$CONFIG['TABLE_CONFIG']} WHERE name = 'limit_upload_upload_limit'"), 0); $time_limit = mysql_result(cpg_db_query("SELECT value FROM {$CONFIG['TABLE_CONFIG']} WHERE name = 'limit_upload_time_limit'"), 0); foreach ($lang_plugin_limit_upload['upload_limit_values'] as $key => $value) { $selected = $time_limit == $key ? 'selected="selected"' : ''; $time_limit_options .= "<option value=\"{$key}\" {$selected}>{$value}</option>"; } $submit_icon = cpg_fetch_icon('ok', 1); echo <<<EOT <tr> <td class="tableb"> {$lang_plugin_limit_upload['upload_limit']} </td> <td class="tableb"> <input type="input" class="listbox" size="5" name="upload_limit" id="plugin_limit_upload_files" value="{$upload_limit}" /> <select class="listbox" name="time_limit">{$time_limit_options}</select> </td>
$prev_target = URL::index('&file=reviewcom&start=' . max(0, $start - $count) . '&count=' . $count); $s50 = $count == 50 ? 'selected' : ''; $s75 = $count == 75 ? 'selected' : ''; $s100 = $count == 100 ? 'selected' : ''; if ($start + $count < $comment_count) { $next_link = "<a href=\"{$next_target}\"><b>" . R_SEE_NEXT . "</b></a> - "; } else { $next_link = ''; } if ($start > 0) { $prev_link = "<a href=\"{$prev_target}\"><b>" . R_SEE_PREV . "</b></a> - "; } else { $prev_link = ''; } pageheader(REVIEW_TITLE); starttable(); echo ' <tr> <form action="' . URL::index("&file=reviewcom&start=" . $start . "&count=" . $count) . '" method="post" enctype="multipart/form-data" accept-charset="' . _CHARSET . '"> <td class="tableh1" colspan="3"><h2>' . REVIEW_TITLE . '</h2></td> </tr> '; if ($nb_com_del > 0) { $msg_txt = sprintf(N_COMM_DEL, $nb_com_del); echo <<<EOT <tr> <td class="tableh2" colspan="3" align="center"> <br /><b>{$msg_txt}</b><br /><br /> </td> </tr>
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip) { global $HTTP_COOKIE_VARS, $CONFIG; starttable(); echo $nav_menu; endtable(); starttable(); echo $picture; endtable(); if ($CONFIG['display_film_strip'] == 1) { // added film strip code: Zarsky echo $film_strip; } starttable(); echo $votes; endtable(); $picinfo = isset($HTTP_COOKIE_VARS['picinfo']) ? $HTTP_COOKIE_VARS['picinfo'] : ($CONFIG['display_pic_info'] ? 'block' : 'none'); echo "<div id=\"picinfo\" style=\"display: {$picinfo};\">\n"; starttable(); echo $pic_info; endtable(); echo "</div>\n"; starttable(); echo $comments; endtable(); }
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip) { global $CONFIG, $LINEBREAK; $superCage = Inspekt::makeSuperCage(); $width = $CONFIG['picture_table_width']; echo '<a name="top_display_media"></a>'; // set the navbar-anchor starttable(); echo $nav_menu; endtable(); starttable(); echo "<tr>"; echo "<td height='100%'><table width='100%'><!-- gb before picture -->"; echo $picture; echo "</table></td><!-- gb after picture -->"; if ($CONFIG['display_film_strip'] == 1) { echo "<td width='200' height='100%' class=\"tablebspecial\"><!-- gb before film_strip -->"; echo $film_strip; echo "</td><!-- gb after film_strip -->"; } echo "</tr>"; endtable(); echo $votes; $picinfo = $superCage->cookie->keyExists('picinfo') ? $superCage->cookie->getAlpha('picinfo') : ($CONFIG['display_pic_info'] ? 'block' : 'none'); echo $LINEBREAK . '<div id="picinfo" style="display: ' . $picinfo . ';">' . $LINEBREAK; starttable(); echo $pic_info; endtable(); echo '</div>' . $LINEBREAK; echo '<a name="comments_top"></a>'; echo '<div id="comments">' . $LINEBREAK; echo $comments; echo '</div>' . $LINEBREAK; }