function getProductName($id, $typeid, $productname = '') { global $dsql; $channeltable = array("1" => "#@__line", "2" => "#@__hotel", "3" => "#@__car", "4" => "#@__article", "5" => "#@__spot", "6" => "#@__photo", "7" => "#@__theme", "8" => "#@__visa", "9" => "#@__ticket", "10" => "#@__leave", "11" => "#@__advertise", "12" => "#@__allcomments", "13" => "#@__tuan"); $tablename = $channeltable[$typeid]; $fields = array('1' => array('field' => 'title', 'link' => 'lines'), '2' => array('field' => 'title', 'link' => 'hotels'), '3' => array('field' => 'title', 'link' => 'cars'), '4' => array('field' => 'title', 'link' => 'article'), '5' => array('field' => 'title', 'link' => 'spots'), '8' => array('field' => 'title', 'link' => 'visa'), '13' => array('field' => 'title', 'link' => 'tuan')); $field = $fields[$typeid]['field']; $link = $fields[$typeid]['link']; //如果为空,则是通用模块 if (empty($field)) { $moduleinfo = Helper_Archive::getModuleInfo($typeid); $field = 'title'; $link = $moduleinfo['pinyin']; $tablename = 'sline_model_archive'; } $sql = "select aid,{$field} as title,webid from {$tablename} where id='{$id}'"; $row = $dsql->GetOne($sql); $title = !empty($productname) ? $productname : $row['title']; $weburl = GetWebURLByWebid($row['webid']); $out = "<a href=\"{$weburl}/{$link}/show_{$row['aid']}.html\" target=\"_blank\">{$title}</a>"; return $out; }
public static function getOrderName($typeid) { switch ($typeid) { case "1": $out = '线路订单'; break; case "2": $out = '酒店订单'; break; case "3": $out = '租车订单'; break; case "5": $out = '门票订单'; break; case "8": $out = '签证订单'; break; case "13": $out = '团购订单'; break; default: $info = Helper_Archive::getModuleInfo($typeid); $out = $info['modulename'] . '订单'; } return $out; }