예제 #1
0
require_once B_ROOT . './source/adminfunc/album.func.php';
if (!empty($_POST['valuesubmit'])) {
    $albumid = createalbum($shopid, $_POST['catid'], $_G['uid'], $_G['username'], $_POST['album']['subject'], $_POST['album']['description']);
    if ($albumid > 0) {
        itemnumreset('album', $shopid);
        $_BCACHE->deltype('sitelist', 'album');
        $_BCACHE->deltype('storelist', 'album', $shopid);
        $_BCACHE->deltype('storelist', 'photo', $shopid, $albumid);
        cpmsg('message_success', $BASESCRIPT . '?action=add&m=photo&albumid=' . $albumid);
    }
}
//添加或更改的頁面
shownav('infomanage', 'nav_album_add', $_SGLOBAL['panelinfo']['subject']);
showformheader('add&m=album');
showtableheader('');
showsetting('album_subject', 'album[subject]', '', 'text');
showsetting('album_description', 'album[description]', '', 'textarea');
$mycats = mymodelcategory('album');
$please_select = '<select name="album[catid]" id="album_catid" style="width:140px;"><option value="0" selected="selected">' . lang('please_select') . '</option>';
foreach ($mycats as $value) {
    $please_select .= '<option value="' . $value['catid'] . '" >' . $value['name'] . '</option>';
}
$please_select .= '</select>';
//showsetting('album_catid', 'album[catid]', '',$please_select);
echo '<tr><td class="td27" colspan="2">' . lang('shop_album_catid') . '</td></tr><tr><td class="vtop rowform" id="' . $showarr['name'] . 'div" colspan="2">';
echo InteractionCategoryMenu(mymodelcategory('album'), 'catid', null, null);
echo '</td></tr>';
showalbumattr();
showsubmit('valuesubmit');
showtablefooter();
showformfooter();
예제 #2
0
$shopid = intval($_G['myshopid']);
$catType = $type = trim($_GET['type']);
$relatedtype = trim($_GET['relatedtype']);
if ($_GET['opt'] == 'getCat' && $_GET['catid'] > 0) {
    // 取出店舖組下可用的分類
    $mycats = mymodelcategory($catType);
    if ($mycats) {
        foreach ($mycats as $cat) {
            echo "<option value=\"{$cat['catid']}\">{$cat['name']}</option>\n";
        }
    } else {
        echo '<option value="0">' . lang('please_select') . "</option>\n";
    }
} elseif ($opt == 'getallCat' && $_GET['groupid'] > 0) {
    // 取出店舖組下可用的分類
    $mycats = mymodelcategory($catType);
    if ($mycats) {
        echo '<option value="0" selected="selected">' . lang('please_select') . "</option>\n";
        foreach ($mycats as $catinfo) {
            echo '<option value="' . $catinfo['catid'] . '">' . $catinfo['pre'] . $catinfo['name'] . '</option>';
        }
    } else {
        echo '<option value="0">' . lang('please_select') . "</option>\n";
    }
} elseif ($_GET['opt'] == 'search') {
    //關聯信息中搜索該商舖下的關聯對像
    $itemid = !empty($_GET['itemid']) ? intval($_GET['itemid']) : '';
    $keyword = trim($_GET['keyword']);
    $keyword = biconv($keyword, 'UTF-8', $_G['charset']);
    $wheresql = ' WHERE shopid=\'' . $shopid . '\'';
    $wheresql .= $catid != 0 ? ' AND catid=\'' . $catid . '\'' : '';
예제 #3
0
function showlistmod($mname)
{
    global $_G, $catstr, $opcheckstr, $gradestr, $_SGLOBAL, $_SC;
    //下拉框拼湊
    $opcheckstr = "";
    foreach ($_SGLOBAL['shopgrade'] as $key => $value) {
        if ($_G['myshopstatus'] == 'verified' && ($key == 0 || $key == 5 || !pkperm('isadmin') && $key == 1)) {
        } else {
            $opcheckstr .= '&nbsp; <input class="radio" type="radio" name="opcheck" value="' . $key . '"' . (pkperm('isadmin') ? ' onClick="showchecktxt(' . $key . ');"' : '') . '> ' . $value . ' &nbsp;';
            $gradestr .= '<option value="' . $key . '" ' . ($_GET['grade'] == $key ? 'selected="selected"' : '') . '>' . $value . '</option>';
        }
    }
    //批量操作方法
    $opt_master_pass = $_GET['optpass'] == 1 ? true : false;
    //快速操作,管理員點擊待審核列表時,只出現更改審核狀態的設置
    $update_master_pass = $_GET['updatepass'] == 1 ? true : false;
    //審核通過店舖,修改信息後站長審核頁面。
    showtableheader(lang('operation_form'), 'nobottom');
    if (!$opt_master_pass && !$update_master_pass) {
        showsubtitle(array('', 'operation', 'option'));
    }
    $checktextjavascript = '
		<script type="text/javascript" charset="' . $_G['charset'] . '">
		function showchecktxt(cktxtid) {
			if($("#newgroupid").length>0) {
				$("#newgroupfield").css("display","none");
			}
			if(cktxtid==1) {
				$("#check_trid").css("display",""); $("#check_txtid").text("' . lang('mod_checktxt_fail') . '");
			} else if(cktxtid==2) {
				$("#check_trid").css("display",""); $("#check_txtid").text("' . lang('mod_checktxt_close') . '");
			} else if(cktxtid==3) {
				if($("#newgroupid").length>0) {
					$("#newgroupfield").css("display","");
				} else {
					var newgroupid = $("#groupid").clone();
					newgroupid[0].id= "newgroupid";
					newgroupid[0].name= "newgroupid";
					$("#newgroupselect").before(newgroupid);
					$("#newgroupfield").css("display","");
				}
				$("#check_trid").css("display",""); $("#check_txtid").text("' . lang('mod_checktxt_pass') . '");
			} else if(cktxtid==4) {
				$("#check_trid").css("display",""); $("#check_txtid").text("' . lang('mod_checktxt_recommend') . '");
			} else {
				$("#check_trid").css("display","none"); $("#check_txtid").text("");
			}
			}
			$(function() {
				$("#submit_listsubmit").click(function() {
					var operations = $(":radio[name=\'operation\']");
					if(operations.length>0) {
						for(var i = 0; i < operations.length; i++) {
							if(operations[i].checked) {
								return true;
							}
						}
					}
					alert("' . lang("operation_mustselected") . '");
					return false;
				});
			});
		</script>';
    // 如果進入的是待審核快速操作選項
    if ($opt_master_pass) {
        if ($mname == 'shop') {
            showtablerow('', array('style="display:none;"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" checked name="operation" value="check">', '&nbsp; <input type="radio" onclick="showchecktxt(3);" value="3" name="opcheck" class="radio">' . lang('pass_update') . '&nbsp;&nbsp; <input type="radio" onclick="showchecktxt(1);" value="1" name="opcheck" class="radio">' . lang('del_update')));
            showtablerow('id="check_trid" style="display:none;"', array('class="rowform" style="width:auto;"'), array('&nbsp;<textarea rows="6" name="check_txt" id="check_txtid" cols="50" class="tarea"></textarea> <span class="vtop tips2">' . lang('mod_check_textarea_comment') . '</span>'));
            $catstr = '<select name="newgroupid" id="newgroupid">';
            $query = DB::query("SELECT * FROM " . tname("shopgroup") . " ORDER BY id ASC;");
            while ($result = DB::fetch($query)) {
                $catstr .= '<option value="' . $result['id'] . '">' . $result['title'] . '</option>';
            }
            showtablerow('id="newgroupfield" style="display:none;"', array('class="rowform" style="width:auto;"'), array($catstr . '</select> <span id="newgroupselect" class="vtop tips2">' . lang('mod_check_newgroupid_comment') . '</span>'));
            echo $checktextjavascript;
        } else {
            showtablerow('', array('style="display:none;"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" checked="checked" name="operation" value="passcheck">', '&nbsp; <input type="radio" onclick="showchecktxt(3);" checked="checked" value="3" name="opcheck" class="radio">' . lang('pass_update') . ' &nbsp; <input type="radio" onclick="showchecktxt(1);" value="1" name="opcheck" class="radio">' . lang('del_update')));
            showtablerow('id="check_trid" style="display:;"', array('class="rowform" style="width:auto;"'), array('&nbsp;<textarea rows="6" name="check_txt" id="check_txtid" cols="50" class="tarea">' . lang('mod_update_pass_' . $mname) . '</textarea> <span class="vtop tips2">' . lang('mod_check_textarea_comment_' . $mname) . '</span>'));
            echo $checktextjavascript_ = '<script type="text/javascript" charset="' . $_G['charset'] . '">function showchecktxt(cktxtid) {
				if(cktxtid==1) {
					$("#check_trid").css("display",""); $("#check_txtid").text("' . lang('mod_checktxt_refuse_' . $mname) . '");
				} else if(cktxtid==3) {
					$("#check_trid").css("display",""); $("#check_txtid").text("' . lang('mod_checktxt_pass_' . $mname) . '");
				}
			}
				</script>
			';
        }
    } elseif ($update_master_pass) {
        if ($mname == 'shop') {
            showtablerow('', array('style="display:none;"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" checked name="operation" value="passupdate">', '&nbsp; <input class="radio" type="radio" checked="checked" name="update" value="1" />' . lang('pass_update') . ' &nbsp; <input class="radio" type="radio" name="update" value="0" />' . lang('del_update')));
            showtablerow('id="check_trid" style="display:;"', array('class="rowform" style="width:auto;"'), array('&nbsp;<textarea rows="6" name="check_txt" id="check_txtid" cols="50" class="tarea">' . lang('mod_update_pass_' . $mname) . '</textarea> <span class="vtop tips2">' . lang('mod_check_textarea_comment') . '</span>'));
        } else {
            showtablerow('', array('style="display:none;"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" checked name="operation" value="passupdate">', '&nbsp; <input class="radio" type="radio" checked="checked" name="update" value="1" />' . lang('pass_update') . ' &nbsp; <input class="radio" type="radio" name="update" value="0" />' . lang('del_update')));
            showtablerow('id="check_trid" style="display:;"', array('class="rowform" style="width:auto;"'), array('&nbsp;<textarea rows="6" name="check_txt" id="check_txtid" cols="50" class="tarea">' . lang('mod_update_pass_' . $mname) . '</textarea> <span class="vtop tips2">' . lang('mod_check_textarea_comment_' . $mname) . '</span>'));
        }
        echo '<script type="text/javascript" charset="' . $_G['charset'] . '">
				$(function(e){
					$(":radio[name=\'update\']").click(function(e){
						var update = e.target.value;
						if(update == 0) {
							$("#check_txtid").text("' . lang('mod_update_refuse_' . $mname) . '");
						} else {
							$("#check_txtid").text("' . lang('mod_update_pass_' . $mname) . '");
						}
					});
				});
		</script>';
    } else {
        // 調整顯示順序,除了圖片外都有顯示順序
        if ($mname != 'photo') {
            showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="display">', lang('mod_displayorder'), ''));
        }
        //一般情況的批量操作選項
        if ($mname == 'album') {
            $mycats = array();
            if (pkperm('isadmin')) {
                $mycats = getmodelcategory('album');
            } else {
                $mycats = mymodelcategory('album');
            }
            $please_select = '<select name="catid" id="album_catid" style="width:140px;"><option value="0" selected="selected">' . lang('please_select') . '</option>';
            foreach ($mycats as $value) {
                $please_select .= '<option value="' . $value['catid'] . '" >' . $value['name'] . '</option>';
            }
            $please_select .= '</select>';
            showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="album_movecat" >', lang('mod_album_movecat'), InteractionCategoryMenu(getmodelcategory('album'), 'catid', null, 1)));
        }
        //站長修改店舖組和分類
        if (pkperm('isadmin') && $mname == 'shop') {
            echo '<tr class="hover">
					<td class="td25"><input type="radio" value="changecat" name="operation" class="radio"></td>
					<td class="td24">' . lang("modallshopcat") . '</td>
					<td style="width: auto;" class="rowform">
					<div id="catdiv" style="width: 700px;">
				';
            $catelist = getmodelcategory('shop');
            echo '<div id="' . shopcat . 'div" colspan="2">';
            echo InteractionCategoryMenu(getmodelcategory('shop'), 'shopcat', null, null);
            echo '</div></div></td></tr>';
            $catstr = '<select name="groupid" id="groupid">';
            $query = DB::query("SELECT * FROM " . tname("shopgroup") . " ORDER BY id ASC;");
            while ($result = DB::fetch($query)) {
                $catstr .= '<option value="' . $result['id'] . '">' . $result['title'] . '</option>';
            }
            showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="movecat">', lang('mod_shop_changegroup'), $catstr . '</select>'));
        }
        //站長修改信息所屬店舖
        if (pkperm('isadmin') && $mname != 'shop' && $mname != 'photo') {
            showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="moveshop">', lang('mod_' . $mname . '_moveshop'), '<input class="number" type="number" name="opshopid">' . lang('mod_moveshop_id')));
        }
        //更改店舖狀態
        showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="check">', lang('mod_check'), $opcheckstr));
        if ($mname == 'shop') {
            //店舖狀態短信通知
            showtablerow('id="check_trid" style="display:none;"', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('', lang('mod_check_textarea'), '&nbsp;<textarea rows="6" name="check_txt" id="check_txtid" cols="50" class="tarea"></textarea> <span class="vtop tips2">' . lang('mod_check_textarea_comment') . '</span>'));
            showtablerow('id="newgroupfield" style="display:none;"', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('', '<font color="red">' . lang('shop_newgroupid') . '</font>', ' <span id="newgroupselect" class="vtop tips2">' . lang('mod_check_newgroupid_comment') . '</span>'));
            //店舖狀態短信通知js
            echo $checktextjavascript;
            //是否首頁推薦
            showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="recommend">', lang('mod_recommend'), '&nbsp; <input class="radio" type="radio" name="opallowreply" value="1"> ' . lang('yes') . ' &nbsp; &nbsp; <input class="radio" type="radio" name="opallowreply" value="0"> ' . lang('no')));
            //會員卡
            showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="discount">', lang('mod_discount'), '&nbsp; <input class="radio" type="radio" name="opdiscount" value="1"> ' . lang('mod_discount_yes') . ' &nbsp; &nbsp; <input class="radio" type="radio" name="opdiscount" value="0"> ' . lang('mod_discount_no')));
            //店舖所有者
            showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="owner">', lang('mod_owner'), '<input class="number" type="number" name="opowner" value="" /> <span style="color:#999;">&nbsp;' . lang('mod_owner_inputuid') . '</span>'));
        }
        //是否允許評論
        if ($mname != 'photo' && $mname != 'album') {
            showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="allowreply">', lang('mod_allowreply'), '&nbsp; <input class="radio" type="radio" name="opallowreply" value="1"> ' . lang('mod_allowreply_yes') . ' &nbsp; &nbsp; <input class="radio" type="radio" name="opallowreply" value="0"> ' . lang('mod_allowreply_no')));
        }
        //刪除信息
        showtablerow('', array('class="td25"', 'class="td24"', 'class="rowform" style="width:auto;"'), array('<input class="radio" type="radio" name="operation" value="delete">', lang('mod_delete'), $mname == 'shop' ? '<input class="checkbox" type="checkbox" name="opdelete" id="opdelete" value="1" checked="checked" /><label for="opdelete"> ' . lang('mod_delete_all') . '</label>' : ''));
    }
    showsubmit('listsubmit', 'submit', '');
    showtablefooter();
    showformfooter();
}
예제 #4
0
 *
 *      $Id: import.inc.php 4473 2010-09-15 04:04:13Z fanshengshuai $
 */
if (!defined('IN_ADMIN')) {
    exit('Acess Denied');
}
foreach (array('tid', 'page', 'maxpage', 'count', 'firstonly', 'step', 'albumid', 'minsize', 'authorid') as $value) {
    ${$value} = intval(!empty($_POST[$value]) ? $_POST[$value] : (!empty($_GET[$value]) ? $_GET[$value] : (!empty($_G['cookie']['i_' . $value]) ? $_G['cookie']['i_' . $value] : 0)));
}
$_GET['tid'] = intval($_GET['tid']);
$norepeat = intval($_G['cookie']['i_norepeat']);
$authorid = intval($_G['cookie']['i_t_authorid']);
$author = $_G['cookie']['i_t_author'];
$shopid = intval($_G['cookie']['shopid']);
getpanelinfo($_G['cookie']['shopid']);
$mycats = mymodelcategory('album');
$page = $page > 0 ? $page : 1;
$step = $step > 0 ? $step : 1;
$perpage = 24;
$sqlaids = '';
$mname = 'album';
if (empty($maxpage) && $step > 2) {
    cpmsg('import_cookie_error');
}
shownav('infomanage', 'photo_import');
showsubmenu('menu_album', array(array('menu_album_add', 'add&m=album', '0'), array('menu_photo_import', 'import&m=album', '1')));
showtips('photo_import_tips');
if ($step == 1) {
    //默認填寫基本信息頁面
    clearimportcookie();
    //論壇來的導入相冊