Exemplo n.º 1
0
$user_tz = '';
$connect = new db();
$connect->db_connect();
$controller = new fucn();
//$date1 = '2013-06-05';
//$date2 = '2013-06-27';
if (isset($_REQUEST['id'])) {
    $placeId = $_REQUEST['id'];
    $sql = "SELECT name,email FROM businessCustomer_{$placeId} WHERE follow = 1 AND email <> '' GROUP BY email ORDER BY id DESC";
    $result = mysql_query($sql) or die(mysql_error());
    $ratingTextTemp = array('Name', 'Email');
    $array_col = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
    $r = 0;
    $c = 1;
    foreach ($ratingTextTemp as $val) {
        $objPHPExcel->setActiveSheetIndex(0)->setCellValue($array_col[$r++] . $c, encodequote($val));
    }
    $c = 3;
    while ($row = mysql_fetch_object($result)) {
        $r = 0;
        $colrow = array($row->name, $row->email);
        foreach ($colrow as $val) {
            $objPHPExcel->setActiveSheetIndex(0)->setCellValue($array_col[$r++] . $c, $val);
        }
        $c++;
    }
    $filename = 'followers.xlsx';
    $objPHPExcel->getActiveSheet()->setTitle('data');
    $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
    header('Content-type: application/vnd.ms-excel');
    header('Content-Disposition: attachment; filename="' . $filename . '"');
Exemplo n.º 2
0
     $txtpoor = encodequote($_REQUEST['txtpoor']);
     $txtfair = encodequote($_REQUEST['txtfair']);
     $txtgood = encodequote($_REQUEST['txtgood']);
     $txtexc = encodequote($_REQUEST['txtexc']);
     $obj = array('vpoor' => $txtvpoor, 'poor' => $txtpoor, 'fair' => $txtfair, 'good' => $txtgood, 'excellent' => $txtexc);
     //echo json_encode($obj);
     echo $json = array2json($obj);
     $sql = "UPDATE businessCustom SET ratingText= '" . $json . "' WHERE customPlaceId = {$placeId}";
 } else {
     if ($case == 6) {
         $obj = array('btnshare' => array(encodequote($_REQUEST['txt-share'])), 'share' => array(encodequote($_REQUEST['txtshare1'])), 'logout' => array(encodequote($_REQUEST['txt-logout'])), 'follow' => array(encodequote($_REQUEST['follow-no']), encodequote($_REQUEST['follow-yes'])), 'cambtnoption' => array(encodequote($_REQUEST['btncam1']), encodequote($_REQUEST['btncam2']), encodequote($_REQUEST['btncam3']), encodequote($_REQUEST['btncam4'])), 'campdetails' => array(encodequote($_REQUEST['txt-camdetails'])), 'btnwidget' => array(encodequote($_REQUEST['txt-widget'])));
         echo $json = array2json($obj);
         $sql = "UPDATE businessCustom SET button= '" . $json . "' WHERE customPlaceId = {$placeId}";
     } else {
         if ($case == 7) {
             $obj = array('logoutT' => encodequote($_REQUEST['txtbox9']), 'logoutB' => encodequote($_REQUEST['txtbox10']), 'followT' => encodequote($_REQUEST['txtbox11']), 'followB' => encodequote($_REQUEST['txtbox12']), 'share' => encodequote($_REQUEST['txtbox3']), 'shareB' => encodequote($_REQUEST['txtbox22']), 'sharedT' => encodequote($_REQUEST['txtbox26']), 'sharedB' => encodequote($_REQUEST['txtbox27']));
             $json = array2json($obj);
             $sql = "UPDATE businessCustom SET messageBox= '" . $json . "' WHERE customPlaceId = {$placeId}";
         } else {
             if ($case == 8) {
                 $obj = '';
                 if ($_REQUEST['check'] != '') {
                     $obj = explode(',', $_REQUEST['check']);
                     echo $json = array2json($obj);
                 }
                 $sql = "UPDATE businessCustom SET selectedItems= '" . $json . "' WHERE customPlaceId = {$placeId}";
             } else {
                 if ($case == 9) {
                     $obj = '';
                     $json = '';
                     if ($_REQUEST['check']) {