private function _send() { //请求数据 if (empty($this->telephone)) { parent::callback(C('STATUS_OTHER'), '电话号码不存在'); } elseif (!preg_match("/^1[358]\\d{9}\$/", $this->telephone)) { parent::callback(C('STATUS_OTHER'), '电话号码格式错误'); } //执行发送短信 import("@.Tool.SHP"); //SHP短信发送类 $SHP = new SHP(C('SHP.NAME'), C('SHP.PWD')); //账号信息 $send = $SHP->send($this->telephone, $this->msg); //执行发送 $send_status = explode('=', $send[0]); //对回馈内容处理 $send_status = $send_status[1]; $this->send_status = $send_status; //发送后的状态 }
<SHP->insereSHPgrafico> */ /* Valor: INSERESHPGRAFICO Cria um gráfico e insere no mapa em um local clicado no mapa. Os valores para o gráfico são obtidos do tema indicado na classe. Para cada novo gráfico é criado um tema no mapa. <SHP->insereSHPgrafico> */ case "INSERESHPGRAFICO": include_once "classe_shp.php"; copiaSeguranca($map_file); $m = new SHP($map_file, $_pg["tema"], $locaplic); $retorno = $m->insereSHPgrafico($_pg["x"], $_pg["y"], $_pg["itens"], $_pg["width"], $_pg["inclinacao"], $_pg["shadow_height"], $_pg["ext"]); $_SESSION["contadorsalva"]++; break; /* Valor: MOSTRAWKT Gera string wkt de um conjunto de pontos. */ /* Valor: MOSTRAWKT Gera string wkt de um conjunto de pontos. */ case "MOSTRAWKT": $res = xy2wkt($_pg["xy"]);
Valor: LISTAPONTOSSHAPESEL Lista os pontos dos elementos selecionados de um layer <SHP->listaPontosShapeSel> */ /* Valor: LISTAPONTOSSHAPESEL Lista os pontos dos elementos selecionados de um layer <SHP->listaPontosShapeSel> */ case "LISTAPONTOSSHAPESEL": include_once dirname(__FILE__) . "/../../classesphp/classe_shp.php"; $m = new SHP($map_file, $tema); $retorno = $m->listaPontosShapeSel(); break; } if (isset($map_file) && isset($postgis_mapa) && $map_file != "") { restauraCon($map_file, $postgis_mapa); } cpjson($retorno); /* Function: selecaoPoli Seleciona um tema por polígono baseado em uma lista de pontos. Include: <classe_selecao.php> */
<?php //include Simple Hooks Plugin Class include "SHP.class.php"; //create instance of class $SHP = new SHP(); //set hook to which plugin developers can assign functions $SHP->developer_set_hook('hook-test'); $SHP->developer_set_hook('hook-with_args'); // All pages $SHP->developer_set_hook('hook-head-before'); // Before any HTML, Just for PHP processing $SHP->developer_set_hook('hook-head'); // In the <head> tags, before main container or after page title $SHP->developer_set_hook('hook-main'); // Main Page // Posts $SHP->developer_set_hook('hook-post'); // The top of every post displayed // Creating a post $SHP->developer_set_hook('hook-new'); // The top of the content area // Storing the new post in the DB $SHP->developer_set_hook('hook-newsubmit-before'); $SHP->developer_set_hook('hook-newsubmit-validate'); $SHP->developer_set_hook('hook-newsubmit-after'); // Editing a post $SHP->developer_set_hook('hook-edit'); // The top of the content area // Storing the modified post in the DB $SHP->developer_set_hook('hook-editsubmit-before');
include_once dirname(__FILE__) . "/../safe.php"; verificaBlFerramentas(basename(dirname(__FILE__)), $i3geoBlFerramentas, false); // //faz a busca da função que deve ser executada // $retorno = ""; //string que será retornada ao browser via JSON switch (strtoupper($funcao)) { /* Valor: INSERESHP Insere um ponto em um shape file existente. <SHP->insereSHP> */ case "INSERESHP": include_once dirname(__FILE__) . "/../../classesphp/classe_shp.php"; copiaSeguranca($map_file); $m = new SHP($map_file, $tema); if (!isset($_GET["projecao"])) { $_GET["projecao"] = ""; } $m->insereSHP($_GET["xy"], $_GET["projecao"], $_GET["item"], $_GET["valor"]); $_SESSION["contadorsalva"]++; redesenhaMapa(); break; } if (isset($map_file) && isset($postgis_mapa) && $map_file != "") { restauraCon($map_file, $postgis_mapa); } cpjson($retorno);