12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- defined('BASEPATH') or exit('No direct script access allowed');
-
- /**
- *
- * Model Parser_model
- *
- * This Model for ...
- *
- * @package CodeIgniter
- * @category Model
- * @author Setiawan Jodi <jodisetiawan@fisip-untirta.ac.id>
- * @link https://github.com/setdjod/myci-extension/
- * @param ...
- * @return ...
- *
- */
-
- class Parser_model extends CI_Model
- {
-
- // ------------------------------------------------------------------------
-
- public function __construct()
- {
- parent::__construct();
- }
-
- public function inicioParser()
- {
- $data = array(
- 'cron_ejecucion' => 1,
- "fecha_ejecucion" => date("Y-m-d h:i:s"),
- );
-
- $this->db->where('id', 0);
- $this->db->update('parametros_cron', $data);
- }
-
- public function stopParser()
- {
- $data = array(
- 'cron_ejecucion' => 0,
- "fecha_ejecucion" => date("Y-m-d h:i:s"),
- );
-
- $this->db->where('id', 0);
- $this->db->update('parametros_cron', $data);
- }
-
- public function existCronRun()
- {
- $sql = "SELECT * FROM parametros_cron";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->row();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getUrlArchivos()
- {
- $sql = "SELECT * FROM tipo_licitacion_tablas";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function setInicioLicitacion($licitacionArr)
- {
- $this->db->insert('BRUTO_datos_iniciales', $licitacionArr);
- return $this->db->insert_id();
- }
-
- }
-
- /* End of file Parser_model.php */
- /* Location: ./application/models/Parser_model.php */
|