示例#1
0
 public function __construct(array $config)
 {
     parent::__construct($config);
     $this->debug = $this->getItem('debug', null, true);
     $this->templateDir = realpath($this->getItem('templateDir', null, true));
     $this->mediaPath = preg_replace('/\\/\\//', '/', $this->getItem('mediaPath', null, true));
 }
示例#2
0
 function __construct()
 {
     parent::__construct();
     if (isset($_POST['id'])) {
         $id = $_POST['id'];
     }
     $sql = "SELECT z.id, klad.name kladbishe, kv.name kvartal, z.uchastok, z.shirota, z.dolgota, z.surname, z.name, z.patronymic, z.vid_zahoron, z.otvetstvenniy, z.telefon_otvetstvennogo, z.date_of_birth, z.date_of_death, z.date_create\nFROM zahoron z\nINNER JOIN kvartals kv ON kv . id = z . id_kvartala\nINNER JOIN kladbisha klad ON klad . id = z . id_kladbisha WHERE z.id={$id}";
     if (self::$mysqli->connect_errno) {
         printf("Не удалось подключиться: %s\n", $mysqli->connect_error);
         exit;
     }
     echo "<table class=' col-md-6 table-responsive'>";
     echo "<h2>Карточка умершего</h2>";
     $row = self::$mysqli->query($sql);
     while ($res = mysqli_fetch_array($row)) {
         echo "<tr><td>id</td><td>{$res['id']}</td></tr>";
         echo "<tr><td>кладбище</td><td>{$res['kladbishe']}</td></tr>";
         echo "<tr><td>квартал</td><td>{$res['kvartal']}</td></tr>";
         echo "<tr><td>участок</td><td>{$res['uchastok']}</td></tr>";
         echo "<tr><td>фамилия</td><td>{$res['surname']}</td></tr>";
         echo "<tr><td>имя</td><td>{$res['name']}</td></tr>";
         echo "<tr><td>отчество</td><td>{$res['patronymic']}</td></tr>";
         echo "<tr><td>отчество</td><td>{$res['shirota']}</td></tr>";
         echo "<tr><td>отчество</td><td>{$res['dolgota']}</td></tr>";
         echo "<tr><td>вид захоронения</td><td>{$res['vid_zahoron']}</td></tr>";
         echo "<tr><td>ответственный</td><td>{$res['otvetstvenniy']}</td></tr>";
         echo "<tr><td>телефон</td><td>{$res['telefon_otvetstvennogo']}</td></tr>";
         echo "<tr><td>дата рождения</td><td>{$res['date_of_birth']}</td></tr>";
         echo "<tr><td>дата смерти</td><td>{$res['date_of_death']}</td></tr>";
         echo "<tr><td>дата создания записи</td><td>{$res['date_create']}</td></tr>";
     }
     echo "</tr></table>";
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     if ($_POST['id']) {
         $this->returnKvartals($_POST['id']);
     }
 }
示例#4
0
 /**
  * Create a new Config Instance
  * @param $configPath - path to configuraiton file.
  */
 public function __construct($configPath)
 {
     // Call Config.php constructor to include $settings and $outputBaseDir.
     parent::__construct($configPath);
     $this->wsUrl = $this->settings['API']['ws_url'];
     $this->mappingCSVpath = $this->settings['INPUT']['mapping_csv_path'];
     $this->includeMigratedFromUri = $this->settings['METADATA']['include_migrated_from_uri'];
 }
示例#5
0
		public function __construct(){
			parent::__construct( DIRECTORY_SEPARATOR, 'afterthought.conf' );

			$this->db = new Database(	$this->config['db']['user'],
										$this->config['db']['pass'],
										$this->config['db']['dbname'],
										$this->config['db']['host'],
										'mysql'
									);
		}
示例#6
0
 public function __construct($registry, $options = null)
 {
     if ($options['sync'] && is_bool($options['sync'])) {
         $this->sync = $options['sync'];
     }
     if ($options['protected_mode'] && is_bool($options['protected_mode'])) {
         $this->protected_mode = $options['protected_mode'];
     }
     parent::__construct($registry, $options);
 }
示例#7
0
 public function __construct($dbarr = array())
 {
     parent::__construct($this);
     if ($dbarr) {
         $this->myhost = $dbarr['myhost'];
         $this->dbname = $dbarr['dbname'];
         $this->dbport = $dbarr['dbport'];
         $this->dbroot = $dbarr['dbroot'];
         $this->dbpwd = $dbarr['dbpwd'];
         $this->dbcharset = isset($dbarr['dbcharset']) ? $dbarr['dbcharset'] : 'gb2312';
         $this->linkstyle = isset($dbarr['linkstyle']) ? $dbarr['linkstyle'] : 0;
         $this->dbstyle = isset($dbarr['dbstyle']) ? $dbarr['dbstyle'] : 'mysql';
     }
     $this->db = $this->connectDb();
 }
示例#8
0
 /**
  * @param Config $config OPTIONAL override default config
  */
 public function __construct(Config $config = null)
 {
     parent::__construct();
     if ($config) {
         foreach ($config as $key => $value) {
             $this->{$key} = $value;
         }
     }
     $this->config = $config ?: $this;
     $this->logger = new Logger($this->debug);
     $this->cache = new Cache($this->config, $this->logger);
     $this->pages = new Pages($this->config, $this->cache, $this->logger);
     if ($this->storecache && $this->cache_expire > 0) {
         $this->cache->purge();
     }
 }
示例#9
0
 /**
  * Конструктор.
  * @param array $source данные конфигурации
  * @param string $alias символическое имя
  */
 public function __construct(array &$source, $alias)
 {
     $this->alias = $alias;
     parent::__construct($source);
 }
示例#10
0
 public function __construct($sConfigFile = 'config.json')
 {
     parent::__construct($sConfigFile);
     $this->setup();
 }
示例#11
0
 /**
  * Most importantly, this constructor initializes the full set of
  * settings and options that afect Quickmail.
  *
  * As important, it sets the configured value for the Scenario to which
  * this QMConfig object belongs.
  * @see Scenario::$config Scenario::$config
  * @see QMConfig::initSettings() initSettings()
  *
  * @TODO Check whether we need to call parent constructor..
  * @param type $params
  * @throws Exception
  */
 public function __construct($params = array())
 {
     parent::__construct($params);
     foreach (self::settings() as $setting) {
         $s = new Setting($setting['setting']);
         foreach ($setting['options'] as $o) {
             $s->addOption($o);
         }
         $this->settings[$s->key] = $s;
     }
 }
示例#12
0
文件: Xml.php 项目: ranxin1022/zf2
 /**
  * Loads the section $section from the config file (or string $xml for
  * access facilitated by nested object properties.
  *
  * Sections are defined in the XML as children of the root element.
  *
  * In order to extend another section, a section defines the "extends"
  * attribute having a value of the section name from which the extending
  * section inherits values.
  *
  * Note that the keys in $section will override any keys of the same
  * name in the sections that have been included via "extends".
  *
  * @param  string  $xml     XML file or string to process
  * @param  mixed   $section Section to process
  * @param  boolean $options Whether modifications are allowed at runtime
  * @throws \Zend\Config\Exception When xml is not set or cannot be loaded
  * @throws \Zend\Config\Exception When section $sectionName cannot be found in $xml
  */
 public function __construct($xml, $section = null, $options = false)
 {
     if (empty($xml)) {
         throw new Exception\InvalidArgumentException('Filename is not set');
     }
     $allowModifications = false;
     if (is_bool($options)) {
         $allowModifications = $options;
     } elseif (is_array($options)) {
         if (isset($options['allowModifications'])) {
             $allowModifications = (bool) $options['allowModifications'];
         }
         if (isset($options['skipExtends'])) {
             $this->_skipExtends = (bool) $options['skipExtends'];
         }
     }
     // load XML and throw exception of each failure using previous exception
     $oldUseInternalErrors = libxml_use_internal_errors(true);
     if ($oldUseInternalErrors) {
         libxml_clear_errors();
     }
     if (strstr($xml, '<' . '?xml')) {
         // string concat to fix syntax highlighting
         $config = simplexml_load_string($xml);
     } else {
         $config = simplexml_load_file($xml);
     }
     $xmlErrors = libxml_get_errors();
     if (!$oldUseInternalErrors) {
         libxml_use_internal_errors(false);
     }
     if (count($xmlErrors)) {
         libxml_clear_errors();
         // create and throw exception stack
         $e = null;
         foreach ($xmlErrors as $xmlError) {
             $msg = trim($xmlError->message);
             $line = $xmlError->line;
             $col = $xmlError->column;
             $e = new Exception\RuntimeException($msg . ' @ line/column ' . $line . '/' . $col, 0, $e);
         }
         throw $e;
     }
     if ($section === null) {
         $dataArray = array();
         foreach ($config as $sectionName => $sectionData) {
             $dataArray[$sectionName] = $this->_processExtends($config, $sectionName);
         }
         parent::__construct($dataArray, $allowModifications);
     } else {
         if (is_array($section)) {
             $dataArray = array();
             foreach ($section as $sectionName) {
                 if (!isset($config->{$sectionName})) {
                     throw new Exception\InvalidArgumentException("Section '{$sectionName}' cannot be found in {$xml}");
                 }
                 $dataArray = array_merge($this->_processExtends($config, $sectionName), $dataArray);
             }
             parent::__construct($dataArray, $allowModifications);
         } else {
             if (!isset($config->{$section})) {
                 throw new Exception\InvalidArgumentException("Section '{$section}' cannot be found in {$xml}");
             }
             $dataArray = $this->_processExtends($config, $section);
             if (!is_array($dataArray)) {
                 // Section in the XML file contains just one top level string
                 $dataArray = array($section => $dataArray);
             }
             parent::__construct($dataArray, $allowModifications);
         }
     }
     $this->_loadedSection = $section;
 }
示例#13
0
 /**
  * Create a new Config Instance
  * @param $configPath - path to configuraiton file.
  */
 public function __construct($configPath)
 {
     // Call Config.php constructor to include $settings and $outputBaseDir.
     parent::__construct($configPath);
 }
示例#14
0
 public function __construct()
 {
     parent::__construct();
     $this->connection = parent::getconnection();
 }
示例#15
0
        public function __construct($page_title, $body_id){
			parent::__construct( DIRECTORY_SEPARATOR, 'afterthought.conf' );

			$this->page_title = $page_title;
			$this->body_id = $body_id;
        }
 public function __construct()
 {
     parent::__construct('front');
 }
示例#17
0
 public function __construct($file = null)
 {
     parent::__construct($file);
     $this->mergeConfig();
 }
 public function __construct($settings = false)
 {
     parent::__construct('admin');
 }
示例#19
0
文件: api.php 项目: moli-php/dev-moli
 public function __construct()
 {
     parent::__construct(__CLASS__);
 }
示例#20
0
文件: Xml.php 项目: hjr3/zf2
 /**
  * Loads the section $section from the config file (or string $xml for
  * access facilitated by nested object properties.
  *
  * Sections are defined in the XML as children of the root element.
  *
  * In order to extend another section, a section defines the "extends"
  * attribute having a value of the section name from which the extending
  * section inherits values.
  *
  * Note that the keys in $section will override any keys of the same
  * name in the sections that have been included via "extends".
  *
  * @param  string  $xml     XML file or string to process
  * @param  mixed   $section Section to process
  * @param  boolean $options Whether modifications are allowed at runtime
  * @throws \Zend\Config\Exception When xml is not set or cannot be loaded
  * @throws \Zend\Config\Exception When section $sectionName cannot be found in $xml
  */
 public function __construct($xml, $section = null, $options = false)
 {
     if (empty($xml)) {
         throw new Exception('Filename is not set');
     }
     $allowModifications = false;
     if (is_bool($options)) {
         $allowModifications = $options;
     } elseif (is_array($options)) {
         if (isset($options['allowModifications'])) {
             $allowModifications = (bool) $options['allowModifications'];
         }
         if (isset($options['skipExtends'])) {
             $this->_skipExtends = (bool) $options['skipExtends'];
         }
     }
     set_error_handler(array($this, '_loadFileErrorHandler'));
     // Warnings and errors are suppressed
     if (strstr($xml, '<' . '?xml')) {
         // string concat to fix syntax highlighting
         $config = simplexml_load_string($xml);
     } else {
         $config = simplexml_load_file($xml);
     }
     restore_error_handler();
     // Check if there was a error while loading file
     if ($this->_loadFileErrorStr !== null) {
         throw new Exception($this->_loadFileErrorStr);
     }
     if ($section === null) {
         $dataArray = array();
         foreach ($config as $sectionName => $sectionData) {
             $dataArray[$sectionName] = $this->_processExtends($config, $sectionName);
         }
         parent::__construct($dataArray, $allowModifications);
     } else {
         if (is_array($section)) {
             $dataArray = array();
             foreach ($section as $sectionName) {
                 if (!isset($config->{$sectionName})) {
                     throw new Exception("Section '{$sectionName}' cannot be found in {$xml}");
                 }
                 $dataArray = array_merge($this->_processExtends($config, $sectionName), $dataArray);
             }
             parent::__construct($dataArray, $allowModifications);
         } else {
             if (!isset($config->{$section})) {
                 throw new Exception("Section '{$section}' cannot be found in {$xml}");
             }
             $dataArray = $this->_processExtends($config, $section);
             if (!is_array($dataArray)) {
                 // Section in the XML file contains just one top level string
                 $dataArray = array($section => $dataArray);
             }
             parent::__construct($dataArray, $allowModifications);
         }
     }
     $this->_loadedSection = $section;
 }
示例#21
0
 /**
  * Loads the section $section from the config file encoded as YAML
  *
  * Sections are defined as properties of the main object
  *
  * In order to extend another section, a section defines the "_extends"
  * property having a value of the section name from which the extending
  * section inherits values.
  *
  * Note that the keys in $section will override any keys of the same
  * name in the sections that have been included via "_extends".
  *
  * Options may include:
  * - allow_modifications: whether or not the config object is mutable
  * - skip_extends: whether or not to skip processing of parent configuration
  * - yaml_decoder: a callback to use to decode the Yaml source
  *
  * @param  string  $yaml     YAML file to process
  * @param  mixed   $section Section to process
  * @param  boolean $options Whether modifiacations are allowed at runtime
  */
 public function __construct($yaml, $section = null, $options = false)
 {
     if (empty($yaml)) {
         throw new Exception\RuntimeException('Filename is not set');
     }
     $ignoreConstants = $staticIgnoreConstants = self::ignoreConstants();
     $allowModifications = false;
     if (is_bool($options)) {
         $allowModifications = $options;
     } elseif (is_array($options)) {
         foreach ($options as $key => $value) {
             switch (strtolower($key)) {
                 case 'allow_modifications':
                 case 'allowmodifications':
                     $allowModifications = (bool) $value;
                     break;
                 case 'skip_extends':
                 case 'skipextends':
                     $this->_skipExtends = (bool) $value;
                     break;
                 case 'ignore_constants':
                 case 'ignoreconstants':
                     $ignoreConstants = (bool) $value;
                     break;
                 case 'yaml_decoder':
                 case 'yamldecoder':
                     $this->setYamlDecoder($value);
                     break;
                 default:
                     break;
             }
         }
     }
     // Suppress warnings and errors while loading file
     set_error_handler(array($this, '_loadFileErrorHandler'));
     $yaml = file_get_contents($yaml);
     restore_error_handler();
     // Check if there was a error while loading file
     if ($this->_loadFileErrorStr !== null) {
         throw new Exception\RuntimeException($this->_loadFileErrorStr);
     }
     // Override static value for ignore_constants if provided in $options
     self::setIgnoreConstants($ignoreConstants);
     // Parse YAML
     $config = call_user_func($this->getYamlDecoder(), $yaml);
     // Reset original static state of ignore_constants
     self::setIgnoreConstants($staticIgnoreConstants);
     if (null === $config) {
         // decode failed
         throw new Exception\RuntimeException("Error parsing YAML data");
     }
     if (null === $section) {
         $dataArray = array();
         foreach ($config as $sectionName => $sectionData) {
             $dataArray[$sectionName] = $this->_processExtends($config, $sectionName);
         }
         parent::__construct($dataArray, $allowModifications);
     } elseif (is_array($section)) {
         $dataArray = array();
         foreach ($section as $sectionName) {
             if (!isset($config[$sectionName])) {
                 throw new Exception\RuntimeException(sprintf('Section "%s" cannot be found', $section));
             }
             $dataArray = array_merge($this->_processExtends($config, $sectionName), $dataArray);
         }
         parent::__construct($dataArray, $allowModifications);
     } else {
         if (!isset($config[$section])) {
             throw new Exception\RuntimeException(sprintf('Section "%s" cannot be found', $section));
         }
         $dataArray = $this->_processExtends($config, $section);
         if (!is_array($dataArray)) {
             // Section in the yaml data contains just one top level string
             $dataArray = array($section => $dataArray);
         }
         parent::__construct($dataArray, $allowModifications);
     }
     $this->_loadedSection = $section;
 }
示例#22
0
文件: Ini.php 项目: rexmac/zf2
 /**
  * Loads the section $section from the config file $filename for
  * access facilitated by nested object properties.
  *
  * If the section name contains a ":" then the section name to the right
  * is loaded and included into the properties. Note that the keys in
  * this $section will override any keys of the same
  * name in the sections that have been included via ":".
  *
  * If the $section is null, then all sections in the ini file are loaded.
  *
  * If any key includes a ".", then this will act as a separator to
  * create a sub-property.
  *
  * example ini file:
  *      [all]
  *      db.connection = database
  *      hostname = live
  *
  *      [staging : all]
  *      hostname = staging
  *
  * after calling $data = new Zend_Config_Ini($file, 'staging'); then
  *      $data->hostname === "staging"
  *      $data->db->connection === "database"
  *
  * The $options parameter may be provided as either a boolean or an array.
  * If provided as a boolean, this sets the $allowModifications option of
  * Zend_Config. If provided as an array, there are two configuration
  * directives that may be set. For example:
  *
  * $options = array(
  *     'allowModifications' => false,
  *     'nestSeparator'      => '->'
  *      );
  *
  * @param  string        $filename
  * @param  string|null   $section
  * @param  boolean|array $options
  * @throws \Zend\Config\Exception
  * @return void
  */
 public function __construct($filename, $section = null, $options = false)
 {
     if (empty($filename)) {
         throw new Exception\InvalidArgumentException('Filename is not set');
     }
     $allowModifications = false;
     if (is_bool($options)) {
         $allowModifications = $options;
     } elseif (is_array($options)) {
         if (isset($options['allowModifications'])) {
             $allowModifications = (bool) $options['allowModifications'];
         }
         if (isset($options['nestSeparator'])) {
             $this->_nestSeparator = (string) $options['nestSeparator'];
         }
         if (isset($options['skipExtends'])) {
             $this->_skipExtends = (bool) $options['skipExtends'];
         }
     }
     $iniArray = $this->_loadIniFile($filename);
     if (null === $section) {
         // Load entire file
         $dataArray = array();
         foreach ($iniArray as $sectionName => $sectionData) {
             if (!is_array($sectionData)) {
                 $dataArray = $this->_arrayMergeRecursive($dataArray, $this->_processKey(array(), $sectionName, $sectionData));
             } else {
                 $dataArray[$sectionName] = $this->_processSection($iniArray, $sectionName);
             }
         }
         parent::__construct($dataArray, $allowModifications);
     } else {
         // Load one or more sections
         if (!is_array($section)) {
             $section = array($section);
         }
         $dataArray = array();
         foreach ($section as $sectionName) {
             if (!isset($iniArray[$sectionName])) {
                 throw new Exception\InvalidArgumentException("Section '{$sectionName}' cannot be found in {$filename}");
             }
             $dataArray = $this->_arrayMergeRecursive($this->_processSection($iniArray, $sectionName), $dataArray);
         }
         parent::__construct($dataArray, $allowModifications);
     }
     $this->_loadedSection = $section;
 }
示例#23
0
 function __construct()
 {
     parent::__construct();
     if (isset($_POST['kladbishe'])) {
         $kladbishe = $_POST['kladbishe'];
     }
     if (isset($_POST['kvartal'])) {
         $kvartal = $_POST['kvartal'];
     }
     if (isset($_POST['surname'])) {
         $surname = $_POST['surname'];
     }
     if (isset($_POST['name'])) {
         $name = $_POST['name'];
     }
     if (isset($_POST['patronymic'])) {
         $patronymic = $_POST['patronymic'];
     }
     if (isset($_POST['vid_zahoron'])) {
         $vid_zahoron = $_POST['vid_zahoron'];
     }
     if (isset($_POST['date_of_birth_ot'])) {
         $date_of_birth_ot = $_POST['date_of_birth_ot'];
     }
     if (isset($_POST['date_of_death_ot'])) {
         $date_of_death_ot = $_POST['date_of_death_ot'];
     }
     if (isset($_POST['date_create_ot'])) {
         $date_create_ot = $_POST['date_create_ot'];
     }
     if (isset($_POST['date_of_birth_do'])) {
         $date_of_birth_do = $_POST['date_of_birth_do'];
     }
     if (isset($_POST['date_of_death_do'])) {
         $date_of_death_do = $_POST['date_of_death_do'];
     }
     if (isset($_POST['date_create_do'])) {
         $date_create_do = $_POST['date_create_do'];
     }
     if ($_GET["numpage"]) {
         $NumPage = $_GET["numpage"];
     } else {
         $NumPage = 1;
     }
     $Rows = 10;
     $Pages = 1;
     $Counter = 0;
     $sql = "SELECT z.id, klad.name kladbishe, kv.name kvartal, z.uchastok, z.shirota, z.dolgota, z.surname, z.name, z.patronymic, z.vid_zahoron, z.otvetstvenniy, z.telefon_otvetstvennogo, z.date_of_birth, z.date_of_death, z.date_create\nFROM zahoron z\nINNER JOIN kvartals kv ON kv . id = z . id_kvartala\nINNER JOIN kladbisha klad ON klad . id = z . id_kladbisha WHERE 1=1";
     if (isset($kladbishe) && $kladbishe != '' && $kladbishe != 'выберите кладбище') {
         $sql .= " AND klad.name LIKE '{$kladbishe}' ";
         $sql .= " AND klad.name LIKE '{$kladbishe}' ";
     }
     if (isset($kvartal) && $kvartal != '' && $kvartal != 'выберите квартал') {
         $sql .= " AND kv.name LIKE '{$kvartal}' ";
     }
     if (isset($surname) && $surname != '') {
         $sql .= " AND z.surname LIKE '{$surname}' ";
     }
     if (isset($name) && $name != '') {
         $sql .= " AND z.name LIKE '{$name}' ";
     }
     if (isset($patronymic) && $patronymic != '') {
         $sql .= " AND z.patronymic LIKE '{$patronymic}' ";
     }
     if (isset($vid_zahoron) && $vid_zahoron != '') {
         $sql .= " AND z.vid_zahoron LIKE '{$vid_zahoron}' ";
     }
     if (isset($date_of_birth_ot) && $date_of_birth_ot != '' && empty($date_of_birth_do)) {
         $sql .= " AND z.date_of_birth = '{$date_of_birth_ot}' ";
     }
     if (isset($date_of_birth_do) && $date_of_birth_do != '' && empty($date_of_birth_ot)) {
         $sql .= " AND z.date_of_birth = '{$date_of_birth_do}' ";
     }
     if (isset($date_of_birth_ot) && $date_of_birth_ot != '' && isset($date_of_birth_do) && $date_of_birth_do != '') {
         $sql .= " AND z.date_of_birth between '{$date_of_birth_ot}' AND '{$date_of_birth_do}' ";
     }
     if (isset($date_of_death_ot) && $date_of_death_ot != '' && empty($date_of_death_do)) {
         $sql .= " AND z.date_of_death = '{$date_of_death_ot}' ";
     }
     if (isset($date_of_death_do) && $date_of_death_do != '' && empty($date_of_death_ot)) {
         $sql .= " AND z.date_of_death = '{$date_of_death_do}' ";
     }
     if (isset($date_of_death_ot) && $date_of_death_ot != '' && isset($date_of_death_do) && $date_of_death_do != '') {
         $sql .= " AND z.date_of_death between '{$date_of_death_ot}' AND '{$date_of_death_do}' ";
     }
     if (isset($date_create_ot) && $date_create_ot != '' && empty($date_create_do)) {
         $sql .= " AND z.date_create = '{$date_create_ot}' ";
     }
     if (isset($date_create_do) && $date_create_do != '' && empty($date_create_ot)) {
         $sql .= " AND z.date_create = '{$date_create_do}' ";
     }
     if (isset($date_create_ot) && $date_create_ot != '' && isset($date_create_do) && $date_create_do != '') {
         $sql .= " AND z.date_create between '{$date_create_ot}' AND '{$date_create_do}' ";
     }
     $sql .= "order by z.date_of_birth ASC";
     $results = mysqli_query(self::$mysqli, $sql);
     //$sql.= " LIMIT {$count}, {$itemsPerPage}";
     echo "<table class=' col-md-12 table-responsive'><tr>\n            <!--<th>id</th>\n            <th>кладбище</th>\n            <th>квартал</th>\n            <th>участок</th>-->\n            <th>фамилия</th>\n            <th>имя</th>\n            <th>отчество</th>\n            <th>вид захоронения</th>\n            <th>широта</th>\n            <th>долгота</th>\n            <!--<th>ответственный</th>\n            <th>телефон</th>-->\n            <th>дата рождения</th>\n            <th>дата смерти</th>\n            <th>дата создания</th>\n            <th>профиль</th>\n        </tr>";
     while ($res = mysqli_fetch_array($results)) {
         if (!$res) {
             echo "<tr><td colspan='9'>Нет данных</td></tr>";
         } else {
             if ($Counter == $Rows) {
                 $Counter = 1;
                 $Pages++;
             } else {
                 $Counter++;
             }
             $id = $res['id'];
             $shirota = $res['shirota'];
             $dolgota = $res['dolgota'];
             $uchastok = $res['uchastok'];
             $fio = $res['surname'] . ' ' . $res['name'] . ' ' . $res['patronymic'];
             if ($Pages == $NumPage) {
                 /*
                                     echo"<tr><td id='id'>{$res['id']}</td>";
                                     echo"<td>{$res['kladbishe']}</td>";
                                     echo"<td>{$res['kvartal']}</td>";
                                     echo"<td>{$res['uchastok']}</td>";*/
                 echo "<tr class='page page" . $numpage . "'><td>{$res['surname']}</td>";
                 echo "<td>{$res['name']}</td>";
                 echo "<td>{$res['patronymic']}</td>";
                 echo "<td>{$res['vid_zahoron']}</td>";
                 echo "<td>{$res['shirota']}</td>";
                 echo "<td>{$res['dolgota']}</td>";
                 /*echo"<td>{$res['otvetstvenniy']}</td>";
                   echo"<td>{$res['telefon_otvetstvennogo']}</td>";*/
                 echo "<td>{$res['date_of_birth']}</td>";
                 echo "<td>{$res['date_of_death']}</td>";
                 echo "<td>{$res['date_create']}</td>";
                 echo "<td><input type='button' class='profile btn btn-default' onclick='profile({$id});showOnMap({$shirota}, {$dolgota},\"{$uchastok}\", \"{$fio}\")';  id='info' value='Подробнее'></input></td>";
                 echo "</tr>";
             }
         }
     }
     echo "</tr></table><br><br><table align='center'><tr id='pline_1'>";
     for ($i = 1, $numl = 2, $Counter = 1; $i <= $Pages; $i++, $Counter++) {
         if ($Counter == 11) {
             echo "<td style='border: 1px solid black; padding: 5px;'><a class='npage'>>>></a></td>";
             echo "</tr><tr id='pline_" . $numl . "' style='display: none;'>";
             echo "<td style='border: 1px solid black; padding: 5px;'><a class='ppage'><<<</a></td>";
             echo "<td style='border: 1px solid black; padding: 5px;'><a class='pclick' >" . $i . "</a></td>";
             $Counter = 1;
             $numl++;
         } else {
             echo "<td style='border: 1px solid black; padding: 5px;'><a class='pclick'>" . $i . "</a></td>";
         }
     }
     echo "</table>";
 }
示例#24
0
 /**
  * @param $url
  * @param int $status
  * @param array $headers
  * @param array $config
  */
 function __construct($url, $status = 302, array $headers = [], array $config = [])
 {
     parent::__construct(null, $status, $headers + ['Location' => (string) $url], $config);
 }
示例#25
0
文件: Json.php 项目: mvc5/framework
 /**
  * @param $data
  * @param int $status
  * @param array $headers
  */
 function __construct($data, $status = 200, array $headers = [])
 {
     parent::__construct($this->encode($data), $status, $headers + ['Content-Type' => 'application/json']);
 }