本文整理汇总了PHP中starttable函数的典型用法代码示例。如果您正苦于以下问题:PHP starttable函数的具体用法?PHP starttable怎么用?PHP starttable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了starttable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: album_share_codes_main
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();
}
}
}
示例2: cpg_die
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 {
示例3: edit_user
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>
//.........这里部分代码省略.........
示例4: pageheader
<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>
示例5: cpg_db_query
}
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;
示例6: starttable
}
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%">
示例7: display_cat_list
<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>
示例8: endtable
<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]} />
示例9: pageheader
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>
示例10: imageflow_mainpage
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);
//.........这里部分代码省略.........
示例11: theme_minicms_edit_editor
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();
}
示例12: display_plugin_list
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">
//.........这里部分代码省略.........
示例13: 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']);
示例14: mysql_free_result
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>
示例15: cpg_die
<?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();