コード例 #1
0
ファイル: sanree_brand_ajax.php プロジェクト: herosrx/shops
    if ($isalbum != 1) {
        showmessage(srlang('stopalbumtip'));
    }
    if ($brandresult[allowalbum] != 1) {
        showmessage(srlang('noallowalbum'));
    }
    $albumid = intval($_G['sr_albumid']);
    if (submitcheck('postsubmit')) {
        $setarr['albumname'] = dhtmlspecialchars(trim($_G['sr_albumname']));
        if (intval($_G['sr_istop']) == 1) {
            $data = C::t('#sanree_brand#sanree_brand_album')->get_by_albumid($albumid);
            C::t('#sanree_brand#sanree_brand_album_category')->update($data['catid'], array('pic' => $data['pic']));
        }
        C::t('#sanree_brand#sanree_brand_album')->userupdate($albumid, $_G['uid'], $setarr);
        $extra = array();
        $url_forward = srreferer() ? $_G['referer'] : 'plugin.php?id=sanree_brand&mod=mybrand&view=myalbum&st=album&catid=' . $catid . '&bid=' . $bid;
        if ($_G['inajax']) {
            $href = $url_forward;
            $href = str_replace("'", "\\'", $href);
            $url_forward = '';
            $extra = array('showdialog' => true, 'extrajs' => "<script type=\"text/javascript\" reload=\"1\">hideWindow('editpic', 0, 1);setTimeout(\"window.location.href ='" . $href . "';\", 3000);</script>");
        }
        showmessage(srlang('modiypidsucceed'), $url_forward, array(), $extra);
    } else {
        $result = C::t('#sanree_brand#sanree_brand_album')->userget_by_albumid($albumid, $_G['uid']);
        if (!$result) {
            showmessage(srlang('error_pic'));
        }
    }
}
include templateEx($plugin['identifier'] . ':' . $template . '/ajax');
コード例 #2
0
            $mflist[] = array($data['mfid'], $data['mfname']);
        }
        $brandmf = explode(',', $result['brandmf']);
        include templateEx($plugin['identifier'] . ':' . $template . "/" . $mod . '_' . $do);
    }
} elseif ($do == 'tag') {
    if (submitcheck('postsubmit')) {
        $setarr = array();
        $setarr['brandtag'] = dhtmlspecialchars(trim($_G['sr_brandtag']));
        C::t('#sanree_brand#sanree_brand_businesses')->update($bid, $setarr);
        $extra = array();
        $_G['inajax'] = 1;
        if ($_G['inajax']) {
            $href = srreferer() ? $_G['referer'] : getburl_by_bid($bid);
            $href = str_replace("'", "\\'", $href);
            $goto = srreferer() ? "\r\nsetTimeout(\"window.location.href ='" . $href . "';\", 3000);" : '';
            $url_forward = '';
            $extra = array('showdialog' => false, 'extrajs' => "<script type=\"text/javascript\" reload=\"1\">///hideWindow('publisheddlg', 0, 1);{$goto}</script>");
        }
        showmessage(srlang('savesucceed'), '', array(), $extra);
    } else {
        $resultempty = FALSE;
        $orderby = $searchtext = $extra = $srchuid = '';
        $orderby = 'tagid desc';
        $searchtext = ' AND status=1 ';
        if (!empty($skeyword)) {
            $searchfield = array('tagname');
            $search = array();
            foreach ($searchfield as $v) {
                $search[] = "(" . $v . " LIKE '%" . $skeyword . "%')";
            }
コード例 #3
0
            }
            $murl = 'plugin.php?id=sanree_brand&mod=mybrand' . $extra;
            $multi = multi($count, $perpage, $page, $murl);
        }
    }
} elseif ($st == 'album') {
    $brandgroup = C::t('#sanree_brand#sanree_brand_group')->get_by_groupid($brandresult['groupid']);
    $allowdeletealbum = intval($brandgroup['allowdeletealbum']);
    if (submitcheck('postsubmit')) {
        foreach ($_G['sr_album_displayorder'] as $id => $title) {
            $setarr = array('ishome' => intval($_G['sr_album_ishome'][$id]), 'displayorder' => intval($_G['sr_album_displayorder'][$id]));
            C::t('#sanree_brand#sanree_brand_album')->update($id, $setarr);
        }
        $extra = array();
        $_G['inajax'] = 1;
        $url_forward = srreferer() ? getburl_by_bid($bid) : 'plugin.php?id=sanree_brand&mod=mybrand&view=myalbum&st=album&bid=' . $bid;
        if ($_G['inajax']) {
            $href = $url_forward;
            $href = str_replace("'", "\\'", $href);
            $url_forward = '';
            $extra = array('showdialog' => true, 'extrajs' => "<script type=\"text/javascript\" reload=\"1\">//hideWindow();\r\nsetTimeout(\"window.location.href ='" . $href . "';\", 3000);</script>");
        }
        showmessage(srlang('savesucceed'), $url_forward, array(), $extra);
    } else {
        $perpage = 15;
        $page = isset($_G['sr_page']) ? intval($_G['sr_page']) : 1;
        $page = max(1, intval($page));
        $start = ($page - 1) * $perpage;
        $start = max(0, $start);
        $multi = '';
        $where = array();
コード例 #4
0
 }
 if (!$address) {
     showmessage(srlang('inputaddress'));
 }
 if ($bid < 1) {
     $count = C::t('#sanree_brand#sanree_brand_businesses')->count_by_where(" AND name='{$name}'");
     if ($count > 0) {
         showmessage(srlang('ishavecom'));
     }
     $url_forward = srreferer() ? $_G['referer'] : $allurl;
     $gothome = intval($_G['sr_gothome']);
     if ($gothome == 1) {
         $url_forward = $allurl;
     }
 } else {
     $url_forward = srreferer() ? $_G['referer'] : 'plugin.php?id=sanree_brand&mod=mybrand';
 }
 $setarr = array();
 $setarr['cateid'] = $cateid;
 $setarr['poster'] = $attachment['attachment'];
 $setarr['caid'] = $caid;
 $setarr['propaganda'] = $propaganda;
 $setarr['introduction'] = $introduction;
 $setarr['weburl'] = $weburl;
 $setarr['contact'] = $contact;
 $setarr['qq'] = $qq;
 if ($ismultiple == 1) {
     $setarr['msn'] = $msn;
     $setarr['wangwang'] = $wangwang;
     $setarr['baiduhi'] = $baiduhi;
     $setarr['skype'] = $skype;