-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplan-comparision-chart.php
59 lines (54 loc) · 2.19 KB
/
plan-comparision-chart.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
<?php
/******************************************************************************
Etano
===============================================================================
File: plan-comparision-chart.php
$Revision$
Software by: DateMill (http://www.datemill.com)
Copyright by: DateMill (http://www.datemill.com)
Support at: http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license. *
******************************************************************************/
require 'includes/common.inc.php';
require _BASEPATH_.'/includes/user_functions.inc.php';
require _BASEPATH_.'/skins_site/'.get_my_skin().'/lang/payment.inc.php';
$tpl=new phemplate(_BASEPATH_.'/skins_site/'.get_my_skin().'/','remove_nonjs');
$query="SELECT `m_name`,`m_value` FROM `{$dbtable_prefix}memberships` WHERE `m_value`<>1 ORDER BY `m_value`";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}
$rows=array();
$i=0;
$rows[0]['class']='header';
$rows[0]['level_diz']='';
$memberships=array();
$cols=array();
while ($rsrow=mysql_fetch_assoc($res)) {
$memberships[]=$rsrow['m_value'];
$cols[]['content']=$rsrow['m_name'];
}
$rows[0]['cols']=$cols;
$query="SELECT `level_diz`,`level` FROM `{$dbtable_prefix}access_levels` WHERE `level_code`<>'login'";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}
$j=1;
while ($rsrow=mysql_fetch_assoc($res)) {
$cols=array();
$rows[$j]['level_diz']=$rsrow['level_diz'];
for ($i=0;isset($memberships[$i]);++$i) {
if (((int)$rsrow['level'])&((int)$memberships[$i])) {
$cols[]['content']='<img src="'.$tplvars['tplrelpath'].'/images/check.gif" />';
} else {
$cols[]['content']=' ';
}
}
$rows[$j]['cols']=$cols;
++$j;
}
$tpl->set_file('content','plan-comparision-chart.html');
$tpl->set_loop('rows',$rows);
$tpl->process('content','content',TPL_MULTILOOP);
$tplvars['title']=$GLOBALS['_lang'][245];
$tplvars['page_title']=$GLOBALS['_lang'][245];
$tplvars['page']='plan';
$tplvars['css']='plan-comparision-chart.css';
$no_timeout=true;
include 'frame.php';