function setting_load() { require_once "mdl.center_send.php"; $center = new mdl_center_send(); $mess = $center->get_tb_nick(); if ($mess) { $nick = $mess['result_msg']; $this->system->setConf('app.taobao_goods.nick', $nick, true); } }
function get_tb_nick() { require_once 'mdl.center_send.php'; $obj = new mdl_center_send(); $status = $this->system->loadModel('system/status'); $sess = $status->get('TB_SESS'); if (empty($sess)) { return false; } else { $status = $this->system->loadModel('system/status'); $sess = $status->get('TB_SESS'); $nick = $obj->get_tb_nick($sess); if ($nick['result'] == 'succ') { return $nick['result_msg']; } else { return false; } } }
function index() { if ($_GET['top_appkey']) { include_once 'mdl.center_send.php'; $obj = new mdl_center_send(); $nick = $obj->get_tb_nick($_GET['top_session']); $nick = $nick['result_msg']; if (empty($nick)) { echo '<script>alert("您还没有对发布淘宝商品的应用进行配置,请先进入工具箱-应用中心,对此应用进行配置后再使用该功能。");window.close();</script>'; exit; } if ($nick != $_GET['nick']) { echo '<script>alert("您登录的淘宝帐号和此功能对应的应用配置中的淘宝帐号不一致,请使用此功能相关应用中配置的淘宝帐号进行登录。");window.close();</script>'; exit; } $this->save_sess($_GET); } if (!$redirect && !$_GET['view']) { echo "<script>window.close()</script>"; exit; } }