-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfapiao.php
92 lines (67 loc) · 2.19 KB
/
fapiao.php
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
/*+**********************************************************************************
* The contents of this file are subject to the 361CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: 361CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
************************************************************************************/
session_start();
require_once (dirname(__FILE__) . "/config.inc.php");
require_once (dirname(__FILE__) . "/config.common.php");
require_once (dirname(__FILE__) . "/util.php");
if(isset($_SESSION['profileid']) && $_SESSION['profileid'] !='')
{
$profileid = $_SESSION['profileid'];
}
elseif(isset($_SESSION['accessprofileid']) && $_SESSION['accessprofileid'] !='')
{
$profileid = $_SESSION['accessprofileid'];
}
else
{
$profileid = "anonymous";
}
$deliveraddressinfo = array();
$fapiaoname = '';
try
{
$fapiaos = XN_Query::create ( 'MainContent' ) ->tag('fapiao_'.$profileid)
->filter ( 'type', 'eic', 'fapiao')
->filter ( 'my.profileid', '=', $profileid)
->end(1)
->execute();
if (count($fapiaos) >0 )
{
$fapiao_info = $fapiaos[0];
$fapiaoname = $fapiao_info->my->fapiao;
}
}
catch ( XN_Exception $e )
{
}
require_once('Smarty_setup.php');
$smarty = new vtigerCRM_Smarty;
$islogined = false;
if ($_SESSION['u'] == $_SESSION['profileid'])
{
$islogined = true;
}
$smarty->assign("islogined",$islogined);
$action = strtolower(basename(__FILE__,".php"));
$recommend_info = checkrecommend();
$smarty->assign("share_info",$recommend_info);
$smarty->assign("supplier_info",get_supplier_info());
$smarty->assign("profile_info",get_supplier_profile_info());
$smarty->assign("fapiao",$fapiaoname);
$sysinfo = array();
$sysinfo['action'] = 'shoppingcart';
$sysinfo['date'] = date("md");
$sysinfo['api'] = $APISERVERADDRESS;
$sysinfo['http_user_agent'] = check_http_user_agent();
$sysinfo['domain'] = $WX_DOMAIN;
$sysinfo['width'] = $_SESSION['width'];
$smarty->assign("sysinfo",$sysinfo);
$smarty->display($action.'.tpl');
?>