| 11588 |
anikendra |
1 |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
2 |
|
|
|
3 |
class Statics extends MY_Controller {
|
|
|
4 |
|
|
|
5 |
public $layoutName ='';
|
|
|
6 |
|
| 11590 |
anikendra |
7 |
public function __construct() {
|
| 11588 |
anikendra |
8 |
// Call the CI_controller constructor
|
|
|
9 |
parent::__construct();
|
|
|
10 |
$this->layout->setlayout('layout/layout_main');
|
|
|
11 |
$this->layoutName= $this->layout->getLayout();
|
|
|
12 |
$this->layoutName =substr($this->layoutName , 0, strrpos($this->layoutName , "/")).'/';
|
|
|
13 |
}
|
|
|
14 |
|
| 11590 |
anikendra |
15 |
public function insuranceterms(){
|
| 11588 |
anikendra |
16 |
$this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
|
|
|
17 |
$data['stylesheet'] = 'recharge.css';
|
|
|
18 |
$data['title'] = 'Theft Insurance - Terms and Conditions';
|
|
|
19 |
$this->layout->view('statics/insuranceterms',$data);
|
|
|
20 |
}
|
| 11590 |
anikendra |
21 |
|
|
|
22 |
public function invalidoffer(){
|
|
|
23 |
$this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
|
|
|
24 |
$data['stylesheet'] = 'recharge.css';
|
|
|
25 |
$data['title'] = 'Expired Offer';
|
|
|
26 |
$this->layout->view('statics/invalidoffer',$data);
|
|
|
27 |
}
|
| 13178 |
anikendra |
28 |
|
|
|
29 |
public function gosf() {
|
|
|
30 |
$this->lessphp->object()->ccompile('assets/css/gosf.less','assets/css/gosf.css');
|
|
|
31 |
$data['stylesheet'] = 'gosf.css';
|
|
|
32 |
$data['title'] = 'GOSF 2014';
|
| 13253 |
anikendra |
33 |
$this->layout->view('statics/gosf',$data);
|
|
|
34 |
if(isset($_POST) && !empty($_POST)) {
|
|
|
35 |
$server = "192.168.190.114";
|
|
|
36 |
$database = "helper";
|
|
|
37 |
$db_user = "root";
|
|
|
38 |
$db_pass = "shop2020";
|
|
|
39 |
if(!isset($dbh)){
|
|
|
40 |
try{
|
|
|
41 |
$dbh = new PDO("mysql:host=$server;dbname=$database",$db_user,$db_pass,array(PDO::ATTR_PERSISTENT => true));
|
|
|
42 |
$sql = "INSERT INTO campaigns VALUES('".$_POST['userEmail']."',1)";
|
|
|
43 |
$dbh->exec($sql);
|
|
|
44 |
}catch(Exception $ex){
|
|
|
45 |
// echo "Internal Error, please try again later!";
|
|
|
46 |
}
|
|
|
47 |
}
|
|
|
48 |
}
|
| 13178 |
anikendra |
49 |
}
|
| 11588 |
anikendra |
50 |
}
|
|
|
51 |
|
| 11590 |
anikendra |
52 |
/* End of file statics.php */
|
|
|
53 |
/* Location: ./application/widgets/controllers/statics.php */
|