1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53:
<?php
class PHPShopExcel extends PHPShopCore {
function __construct() {
$this->objBase=$GLOBALS['SysValue']['base']['products'];
$this->action=array("get"=>"UID",'nav'=>'index');
parent::__construct();
}
function decode($str){
return base64_decode($str);
}
function UID() {
$product_uid=PHPShopSecurity::TotalClean($this->decode($_GET['UID']),2);
$row=$this->PHPShopOrm->select(array('id'),array('uid'=>'="'.PHPShopString::utf8_win1251($product_uid).'"'),false,array('limit'=>1));
if(is_array($row))
if(!empty($row['id'])){
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$this->getValue('dir.dir')."/shop/UID_".$row['id'].".html");
exit();
}
}
function index() {
$this->setError404();
}
}
?>