Exemplo n.º 1
0
$hidden_string;
if (isset($chkarr)) {
    for ($cnt = 0; $cnt < count($chkarr); $cnt++) {
        if ($chkarr[$cnt] == "") {
        } else {
            array_push($new_arr, $chkarr[$cnt]);
        }
    }
    //Retrieve email addresses from database
    for ($i = 0; $i < count($new_arr); $i++) {
        $idd = $new_arr[$i];
        $sql_job = "select * FROM import_contact WHERE  con_id ='" . $idd . "'";
        $res_job = $db->select_data($sql_job);
        $id = $res_job[0]['con_id'];
        if ($id != "") {
            $pub_email = getTypeName('import_contact', 'con_id', 'email_id', $id);
            array_push($mail_arr, $pub_email);
        }
    }
    $mail_string = implode(',', $mail_arr);
    //print_r($mail_string);
}
// this variable is used to provide to hidden input type
$hidden_string = implode(",", $new_arr);
//print_r($hidden_string);
if (isset($_POST['btn_send'])) {
    $classObj->setpostvar($_POST);
    $check = $managerObj->check_msg_details($classObj);
    if (count($check) > 0 || count($check) != "") {
        for ($j = 0; $j < count($check); $j++) {
            $error .= $check[$j] . "<br>";
Exemplo n.º 2
0
<div class="row">
  			<div class="alert alert-info"><b>Заявка №<?=$s;?></b></div>
  			</div>
				<form method="post" action="" role="form" name="form" enctype="multipart/form-data">
					<div class="row">
						<div class="col-sm-5">
							<input type="text" class="form-control input-md" placeholder="Номер входящего" value="<?=$claim->in_num;?>" disabled>
						</div>
						<div class="col-sm-5">
							<input type="text" class="form-control input-md" id="data" placeholder="Выберите дату" value="<?=$claim->in_date; ?>" disabled>
						</div>
					</div>
					<br>
					<div class="row">
						<div class="col-sm-4">
							<input type="text" class="form-control input-md" placeholder="Тема" value="<?=getTypeName($claim->type); ?>" disabled>
						</div>
						<div class="col-sm-7">
							<input type="text" class="form-control input-md" placeholder="Тема / Описание документа" value="<?=$claim->description; ?>" disabled>
						</div>
					</div>
					<br>
					<div class="form-group">
						<input type="text" class="form-control" value="<?=getDepName($claim->sen_dep); ?>" disabled>
						<br>
						<input type="text" class="form-control" value="<?=getSecName($claim->sen_sec); ?>" disabled>
					</div>
					<div class="form-group">
						<input type="text" class="form-control input-md" placeholder="Ф.И.О отправителя" value="<?=$claim->sen_name; ?>" disabled>
					</div>
					<div class="row">
Exemplo n.º 3
0
function browse($json_array)
{
    global $useGsonPrimitives;
    global $depth;
    global $stack;
    global $map;
    $contentType = contentType::NORMAL;
    foreach ($json_array as $key => $val) {
        if (is_numeric($key)) {
            //===>is an item of an array ( within [...])
            if (is_array($val)) {
                //item in array is an {}object
                browse($val);
            } else {
                //item in array is a primitive
                if ($useGsonPrimitives && getTypeName($val) == "int") {
                    $contentType = contentType::PRIMITIVE_INT;
                    $map->add("RealmInt", 'val', "int", null, null);
                } elseif ($useGsonPrimitives && getTypeName($val) == "String") {
                    $contentType = contentType::PRIMITIVE_STRING;
                    $map->add("RealmString", 'val', "String", null, null);
                } else {
                    $map->add(end($stack), 'value', getTypeName($val), null, null);
                }
            }
        } else {
            if (is_array($val)) {
                //===>is a new object ({} or [])
                $depth++;
                array_push($stack, $key);
                $innerType = browse($val);
                array_pop($stack);
                $depth--;
                if ($useGsonPrimitives && $innerType == contentType::PRIMITIVE_INT) {
                    $map->add(end($stack), lcfirst($key), getTypeName($val, "RealmInt"), $key, "RealmInt");
                } else {
                    if ($useGsonPrimitives && $innerType == contentType::PRIMITIVE_STRING) {
                        $map->add(end($stack), lcfirst($key), getTypeName($val, "RealmString"), $key, "RealmString");
                    } else {
                        $map->add(end($stack), lcfirst($key), getTypeName($val, ucfirst($key)), $key, ucfirst($key));
                    }
                }
            } else {
                if (getTypeName($val) != NULL) {
                    $map->add(end($stack), lcfirst($key), getTypeName($val), $key, null);
                }
            }
        }
    }
    return $contentType;
}
 /**
  * doAddURL
  * 手动增加网址
  *
  * @param $_POST['url']  网址
  * @access public
  * @return -1 分享的文件不存在 0 失败 1 成功
  */
 function doAddURL()
 {
     $url = $_POST['url'];
     $url = $this->_js_unescape($url);
     $typeId = $_POST['typeId'];
     if ($typeId == 14) {
         //尝试下载图片,尝试次数超过5次后放弃尝试.
         for ($i = 0; $i = 5; $i++) {
             $imgpath = $this->_getUrlImg($url);
             if ($imgpath) {
                 $url = SITE_URL . '/' . $imgpath;
                 break;
             }
         }
     }
     if ($typeId == 1) {
         $title = $this->explainURL($url);
         $data['title'] = h($title);
     }
     $data['url'] = $url;
     //$data['urlshow'] = getSuburl($url,50);
     $type['typeId'] = $typeId;
     $type['typeName'] = getTypeName($typeId);
     $type['alias'] = getTypeAlias($typeId);
     $info = h($_POST['info']);
     //$purview = $_POST['purview'];
     $fids = $_POST["fids"];
     $result = $this->api->share_addShare($type, 0, $data, $info, 0, $fids);
     echo $result;
 }
Exemplo n.º 5
0
  					<th>Дата отправки</th>
  					<th>Статус</th>
  				</tr>
  				<?php 
for ($i = 0; $i < count($claim); $i++) {
    $n = $i + 1;
    $id = $claim[$i]->cid;
    if ($claim[$i]->status == '1') {
        echo "<tr class='success'>";
        echo '<td>' . $n . '</td>';
        echo "<td><a href='?option=editclaim&id={$id}'>" . $claim[$i]->sen_name . '</td>';
        echo "<td><a href='?option=editclaim&id={$id}'>" . getTypeName($claim[$i]->type) . '</td>';
        echo "<td><a href='?option=editclaim&id={$id}'>" . $claim[$i]->out_date . '</td>';
        echo '<td>Просмотрен</td>';
        echo '</tr>';
    } else {
        echo "<tr class='danger'>";
        echo '<td>' . $n . '</td>';
        echo "<td><a href='?option=editclaim&id={$id}'>" . $claim[$i]->sen_name . '</td>';
        echo "<td><a href='?option=editclaim&id={$id}'>" . getTypeName($claim[$i]->type) . '</td>';
        echo "<td><a href='?option=editclaim&id={$id}'>" . $claim[$i]->out_date . '</td>';
        echo '<td>Не просмотрен</td>';
        echo '</tr>';
    }
}
?>
			</table>
		<ul class="pager">
  			<li class="previous"><a href="#">&larr; Предыдущая</a></li>
			<li class="next"><a href="#">Следующая &rarr;</a></li>
		</ul>
Exemplo n.º 6
0
     $type_id = $obj->attr_type_id;
     $rank_id = $obj->require_rank_id;
     $cp_id = $obj->require_cp_id;
     if ($cp_id != 0) {
         //如果array存在
         array_push($objects[$type_id], $obj);
     }
 }
 // dump($objects);
 //print_r($data_price);exit;
 //数据统计
 foreach ($objects as $val => $obj) {
     if ($obj) {
         $data = countAndPrice($obj, $data_type, $data_price);
         $data['type_id'] = $obj[0]->attr_type_id;
         $data['name'] = getTypeName($data_type, $obj[0]->attr_type_id);
         array_push($s_obj, $data);
         // dump($data);
     } else {
         //补全归类 不需要显示wyong
         /**$nodata = array(
            'type_id' => $val,
            'name' => getTypeName($data_type,$val),
            'price' => 0,
            'fmt_price' => 0,
            'count' => 0
            );
            array_push($s_obj,$nodata);**/
     }
 }
 $arr = array_sort($s_obj, 'count', 'desc');
Exemplo n.º 7
0
function changeOrderDown($offsets, $table, $fildnm, $flag)
{
    global $db;
    $offset = explode('_', $offsets);
    //print_r($offset);
    $previous = $offset[0];
    $current = $offset[1];
    $next = $offset[2];
    $sawp_id_cur = getTypeName($table, $fildnm, "sortorder", $current);
    //echo "<br>swcurr ".$sawp_id_cur;
    $sawp_id_next = getTypeName($table, $fildnm, "sortorder", $next);
    //echo "<br>swnext". $sawp_id_next;
    $sawp_id_previous = getTypeName($table, $fildnm, "sortorder", $previous);
    //echo "<br>swprevious".$sawp_id_previous;
    if ($flag == 0) {
        $sql_down_zero = "UPDATE " . $table . "\n\t\t\t\t\t\t\t SET \n\t\t\t\t\t\t\t sortorder = " . $sawp_id_next . "\n\t\t\t\t\t\t\t WHERE " . $fildnm . "=" . $current;
        $db->update_data($sql_down_zero);
        //
        /*********************/
        $sql_up_zero = "UPDATE " . $table . "\n\t\t\t\t\t\t\t SET \n\t\t\t\t\t\t\t sortorder = " . $sawp_id_cur . "\n\t\t\t\t\t\t\t WHERE " . $fildnm . " =" . $next . "";
        //echo "<br>sql_up_zero :".
        $db->update_data($sql_up_zero);
    } elseif ($flag == 1) {
        $sql_down_one = "UPDATE " . $table . "\n\t\t\t\t\t\t\t SET \n\t\t\t\t\t\t\t sortorder = " . $sawp_id_previous . "\n\t\t\t\t\t\t\t WHERE " . $fildnm . "=" . $current;
        $db->update_data($sql_down_one);
        //echo "<br>sql_down_one :".
        /*********************/
        $sql_up_one = "UPDATE " . $table . "\n\t\t\t\t\t\t\t SET \n\t\t\t\t\t\t\t sortorder = " . $sawp_id_cur . "\n\t\t\t\t\t\t\t WHERE " . $fildnm . " =" . $previous . "";
        //echo "<br>sql_up_one :".
        $db->update_data($sql_up_one);
    }
}
Exemplo n.º 8
0
if (!empty($dest_id)) {
    $sql = "select a.*,b.isjian ,b.isding,b.istejia from #@__hotel a left join #@__kindorderlist b on (a.id=b.aid and b.typeid={$typeid} and a.webid=b.webid and b.classid='{$dest_id}') {$where} {$orderby},b.displayorder asc,a.modtime desc,a.addtime desc  ";
} else {
    $sql = "select a.*,b.isjian ,b.isding,b.istejia from #@__hotel a left join #@__allorderlist b on (a.id=b.aid and b.typeid={$typeid} and a.webid=b.webid ) {$where} {$orderby},b.displayorder asc,a.modtime desc,a.addtime desc  ";
}
$destinfo = getDestInfo($typeid, $dest_id);
//目的地优化信息;
$searchtitle = getSearchTitle($destinfo, $rankid, $priceid, $attrid);
$seoarr = array();
//seo信息数组
//当前页数->title里面使用
$seoarr['pageno'] = !empty($pageno) ? '第' . $pageno . '页-' : "";
//父级与当前级信息
$seoarr['pkname'] = get_par_value($dest_id, $typeid);
$seoarr['dest_id'] = $destid;
$seoarr['typename'] = getTypeName($typeid);
$pv = new ListView($typeid);
$pv->pagesize = 15;
//分页条数.
$pv->SetSql($sql);
//seo变量赋值
foreach ($destinfo as $k => $v) {
    $pv->Fields[$k] = $v;
}
foreach ($seoarr as $k => $v) {
    $pv->Fields[$k] = $v;
}
//搜索标题赋值
$pv->Fields['searchtitle'] = $searchtitle;
//下级目的地
$destlist = Helper_Archive::getChildDest($dest_id, $typeid);
Exemplo n.º 9
0
//seo信息数组
$temparr = getLineCount($wherecount);
$destinfo = getDestInfo($typeid, $dest_id);
//目的地优化信息;
$searchtitle = getSearchTitle($destinfo, $day, $priceid, $attrid, $cityid);
$newnavtitle = getNewNavTitle($day, $attrid, $destinfo['dest_name'], $cityid);
$seoarr['totalline'] = $temparr[0];
$seoarr['totalvisit'] = $temparr[1];
//总访问次数
//当前页数->title里面使用
$seoarr['pageno'] = !empty($pageno) ? '第' . $pageno . '页-' : "";
//父级与当前级信息
//$seoarr['pkname'] = getCurkind($dest_id);
$seoarr['pkname'] = get_par_value($dest_id, $typeid);
$seoarr['dest_id'] = $destid;
$seoarr['channelname'] = getTypeName($typeid);
//是否存在下级目的地
//$GLOBALS['condition']['_hasnext'] = Helper_Archive::checkDestHasChild($dest_id);
//下级目的地
$destlist = Helper_Archive::getChildDest($dest_id, $typeid);
$pv = new ListView($typeid);
$pv->pagesize = 16;
//分页条数.
$pv->SetSql($sql);
//seo变量赋值
foreach ($destinfo as $k => $v) {
    $pv->Fields[$k] = $v;
}
foreach ($seoarr as $k => $v) {
    $pv->Fields[$k] = $v;
}
Exemplo n.º 10
0
    function send_msg_to_person($classObj, $chkarr)
    {
        global $db;
        //print_r($chkarr);
        $postvar = $classObj->getpostvar();
        $mail_to = mysql_real_escape_string($postvar['to']);
        $description = mysql_real_escape_string(stripslashes($postvar['message']));
        $subject = mysql_real_escape_string(stripslashes($postvar['sub']));
        $msg = "";
        $hidden_str = explode(",", $chkarr);
        $uid = $_SESSION['USER_ID'];
        $sql_manager = "SELECT * FROM crm_users WHERE users_id = '" . $uid . "'";
        $res_manager = $db->select_data($sql_manager);
        $firstnames = $res_manager[0]['first_name'];
        $lastnames = $res_manager[0]['last_name'];
        $manager_name = ucfirst($firstnames) . "" . ucfirst($lastnames);
        $email_names = $res_manager[0]['email'];
        for ($i = 0; $i < count($hidden_str); $i++) {
            $id = $hidden_str[$i];
            // if($id=="")
            //{
            //}
            //else
            //{
            $sql_job = "select * FROM import_contact WHERE  con_id ='" . $id . "'";
            $res_sql = $db->select_data($sql_job);
            $id = $res_sql[0]['con_id'];
            $fname = $res_sql[0]['firstname'];
            $lname = $res_sql[0]['lastname'];
            $user_name = ucfirst($fname) . "" . ucfirst($lname);
            $n_email = $res_sql[0]['email_id'];
            $email = getTypeName('import_contact', 'con_id', 'email_id', $id);
            $to = $email;
            $sql_url = "SELECT * FROM tc_urlsetting WHERE id = '1'";
            $res_url = $db->select_data($sql_url);
            $logos = stripslashes($res_url[0]['status']);
            if ($logos == "test") {
                $liveurl = $res_url[0]['test_url'];
            } else {
                $liveurl = $res_url[0]['live_url'];
            }
            $sql_confirm = "INSERT INTO crm_contact_emails (`sender_id`,`receiver_id`,`subject`,`mesbody`,`status`,`created`) VALUES ('" . $uid . "','" . $id . "','" . $subject . "','" . $description . "','1',now())";
            $res_confirm = $db->insert_data($sql_confirm);
            //=======================================================================================================================
            $admin_cc_mail = ADMINMAIL;
            //$subject ="Your  Newsletter";
            $headers = "MIME-Version: 1.0\r\n";
            $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
            //$headers .= "To: $uemail\r\n";
            $from = $email_names;
            //$subject = "Subject: Newsletter\r\n";
            $headers .= "From: {$from}";
            $mailmatter = '<html><body><div style=\\"width:100%;\\">
								<table>
									<tr>
										<td><a href="' . $liveurl . '" target="_blank"><img src="' . $liveurl . 'images/logo.jpg" /></a></td>
									</tr>
								</table>
							<table width="100%" cellspacing="15" cellpadding="0" border="0" bgcolor="#E8F1FA" align="center" style="font-family:Helvetica,Arial,serif">
							<tr><td>Hello ' . $user_name . ',
							<tr><td>&nbsp;</td></tr>
							<tr><td style="font-size: 18px!important;color:#15c!important;">' . stripslashes($description) . '</td></tr>
							<tr><td>&nbsp;</td></tr>
							<tr><td>Sincerely,</td></tr>
							<tr><td>' . $manager_name . '</td></tr>
							</td></tr>
							</table></div></body></html>';
            $message = $mailmatter;
            @mail($to, $subject, $message, $headers);
            ////////////----------------------------send mail------------------------
            //}
        }
        $msg = "Contact E-Mail Send Successfully";
        return $msg;
    }