Example #1
0
 public function viewEvents($id)
 {
     $data = DB::Select(' select * from c_req_cars where req_car_id=' . $id . ' ');
     foreach ($data as $k) {
         $t = '<h3>เรื่อง ' . $k->detail . '</h3>';
         $t .= '<ul class="uk-list uk-list-striped">';
         $t .= '<li>วันที่บันทึก(ว-ด-ป) : ' . date("d-m", strtotime($k->regis_date)) . '-' . (date("Y", strtotime($k->regis_date)) + 543) . ' เวลาบันทึก : ' . date("H:i:s", strtotime($k->regis_date)) . '</li>';
         $t .= '<li>ชื่อผู้ขอ : ' . $k->req_name . '</li>';
         $t .= '<li>ตำแหน่ง : ' . $k->position . '</li>';
         $t .= '<li>ฝ่าย : ' . $k->department . '</li>';
         $t .= '<li class="uk-text-danger" >ไปที่ : ' . $k->location . '</li>';
         $t .= '<li class="uk-text-danger" >รายละเอียด : ' . $k->detail . '</li>';
         $t .= '<li class="uk-text-danger" >ไปวันที่(ว-ด-ป) : ' . date("d-m", strtotime($k->godate)) . '-' . (date("Y", strtotime($k->godate)) + 543) . '</li>';
         $t .= '<li class="uk-text-danger" >ไปเวลา : ' . $k->gotime_start . '</li>';
         $t .= '<li class="uk-text-danger" >เลขทะเบียนรถ : ' . $k->car_number . '</li>';
         $t .= '<li>ผู้ขับ : ' . $k->driver . '</li>';
         if (count($this->chk_subwork($k->req_car_id)) > 0) {
             foreach ($this->chk_subwork($k->req_car_id) as $c) {
                 $t .= '<li class="uk-text-primary" ><mark>ไปกับฝ่าย : ' . $c->department . '</mark></li>';
             }
         }
         $t .= '</ul>';
     }
     return $t;
 }
function ConsultarPermisosCRM($idDoc)
{
    // -------------------------------------------
    // O P C I O N E S  D E  C R M   S E G U N   E L   R O L
    // D E L   U S U A R I O  Y   L A   C O M P A N I A
    // -------------------------------------------
    $permiso = DB::Select('
SELECT 
    nombreRol,
    adicionarDocumentoCRMRol,
    modificarDocumentoCRMRol,
    anularDocumentoCRMRol,
    consultarDocumentoCRMRol,
    aprobarDocumentoCRMRol
From
  documentocrm 
  Inner Join documentocrmcompania
    On documentocrmcompania.DocumentoCRM_idDocumentoCRM =
    documentocrm.idDocumentoCRM 
  Inner Join documentocrmrol
    On documentocrmrol.DocumentoCRM_idDocumentoCRM = documentocrm.idDocumentoCRM
  Inner Join rol
    On documentocrmrol.Rol_idRol = rol.idRol 
  Inner Join users
    On users.Rol_idRol = rol.idRol
Where
  users.id = ' . \Session::get("idUsuario") . ' And
  documentocrmcompania.Compania_idCompania = ' . \Session::get("idCompania") . ' AND idDocumentoCRM = "' . $idDoc . '"');
    return $permiso;
}
 public function getAddLivrabilEtapa($id_etapa)
 {
     $stadii = self::getStadiiLivrabil();
     $livrabile = DB::Select("SELECT \n            tl.id,   \n            tl.denumire \n            FROM etape_predare_livrabile epl\n            INNER JOIN obiectiv obj ON obj.id = epl.id_obiectiv AND obj.logical_delete = 0\n            INNER JOIN template_contract_tipizat_master tctm ON tctm.id = obj.id_template AND tctm.logical_delete = 0\n            INNER JOIN template_contract_tipizat_detail tctd ON tctd.id_template_contract_tipizat_master = tctm.id AND tctd.logical_delete = 0\n            INNER JOIN tip_livrabile tl ON tl.id = tctd.id_tip_livrabil AND tl.logical_delete = 0\n            WHERE epl.id_etapa = :id_etapa", array('id_etapa' => $id_etapa));
     //Debugbar::info("ETP=" . $id_etapa);
     return View::make('livrabile_etapa.add')->with('stadii', $stadii)->with('livrabile', self::object_to_array($livrabile))->with('id_etapa', $id_etapa);
 }
Example #4
0
 public function GetIDS($Keywords, $Property)
 {
     if (!$Keywords) {
         return false;
     }
     if (is_array($Keywords)) {
         foreach ($Keywords as $string) {
             $sql_ext .= ($sql_ext ? ' or ' : '') . 'Keywords=\'' . $string . '\'';
         }
     } else {
         $sql_ext = 'Keywords=\'' . $Keywords . '\'';
     }
     $sql = 'SELECT ' . $Property . ' FROM tbl_keywords WHERE ' . $sql_ext;
     $DB = new DB();
     $RS = $DB->Select($sql);
     if ($RS) {
         $tmpIDS = '';
         foreach ($RS as $list) {
             if ($list[$Property]) {
                 $tmpIDS .= ($tmpIDS ? ',' : '') . $list[$Property];
             }
         }
         $tmpIDS = preg_replace('/(,{2,})/', ',', $tmpIDS);
         if (substr($tmpIDS, 0, 1) == ',') {
             $tmpIDS = substr($tmpIDS, 1);
         }
         if (substr($tmpIDS, -1) == ',') {
             $tmpIDS = substr($tmpIDS, 0, -1);
         }
         $IDS = explode(',', $tmpIDS);
         return implode(',', array_unique($IDS));
     }
     return false;
 }
function ConsultarPermisos($vista)
{
    $permiso = DB::Select('
    SELECT 
        nombreOpcion,
        nombreRol,
        adicionarRolOpcion,
        modificarRolOpcion,
        eliminarRolOpcion,
        consultarRolOpcion,
        rutaOpcion
    FROM
        rol AS r
            LEFT JOIN
        rolopcion AS ro ON ro.Rol_idRol = r.idRol
            LEFT JOIN
        users AS u ON u.Rol_idRol = r.idRol
            LEFT JOIN
        opcion AS o ON ro.Opcion_idOpcion = o.idOpcion
            LEFT JOIN
        paquete AS p ON o.Paquete_idPaquete = p.idPaquete
    WHERE
        Compania_idCompania = ' . \Session::get("idCompania") . ' AND id = ' . \Session::get("idUsuario") . ' AND rutaOpcion = "' . $vista . '"');
    return $permiso;
}
Example #6
0
 public function Lists($UserID, $Page = 1, $PageSize = 10)
 {
     $DB = new DB();
     $Page = max(1, $Page);
     $Offset = ($Page - 1) * $PageSize;
     $Sql = 'SELECT PictureID, Path, Title, Keywords,UserID, IsPublic FROM tbl_pictures where UserID=' . $UserID . ' OR IsPublic=1 ORDER BY PictureID DESC';
     return $DB->Select($Sql, $Offset, $PageSize);
 }
 public function getDetaliiFactura($id_factura)
 {
     $total_defasurator = DB::select("SELECT\n            SUM(pret_fara_tva) AS valoare\n            FROM livrabile_etapa\n            WHERE logical_delete = 0\n            AND id_factura = :id_factura", array('id_factura' => $id_factura));
     $detalii = DB::Select("SELECT\n            df.id_det_fact,\n            df.nr_ordine,\n            df.denumire AS denumire_produs,\n            df.cantitate,\n            um.denumire AS um,\n            df.pret_unitar        \n            FROM detalii_factura df\n            LEFT OUTER JOIN um ON um.id = df.id_um AND um.logical_delete = 0            \n            WHERE df.logical_delete = 0\n            AND df.id_factura = :id_factura", array('id_factura' => $id_factura));
     $factura = self::getFacturaClient($id_factura);
     $ums = self::object_to_array(self::getUM());
     return View::make('facturi_client.list_detalii')->with('factura', $factura)->with('detalii', $detalii)->with('total_defasurator', $total_defasurator[0])->with('ums', $ums);
 }
Example #8
0
 public function getAddObiectiv($id_contract = null)
 {
     $stadii_obiectiv = self::getStadiiObiectiv();
     $ids = self::getIDsDepartamente(Confide::getDepartamenteUser());
     $contracte = DB::Select("SELECT \n            id, denumire \n            FROM contract\n            WHERE logical_delete = 0\n            AND id_departament IN (" . $ids . ")");
     $templates = DB::select("SELECT\n            id, denumire\n            FROM template_contract_tipizat_master\n            WHERE logical_delete = 0\n            ORDER BY id");
     $id_tara = null;
     $id_regiune = null;
     $id_judet = null;
     $contract = null;
     if ($id_contract) {
         $contract = DB::Select("SELECT\n                id, id_tara, id_regiune, id_judet\n                FROM contract \n                WHERE id = :id_contract", array('id_contract' => $id_contract));
         if (count($contract) == 1) {
             $id_tara = $contract[0]->id_tara;
             $id_regiune = $contract[0]->id_regiune;
             $id_judet = $contract[0]->id_judet;
         }
     }
     return View::make('obiective.add')->with('contracte', self::object_to_array($contracte))->with('templates', self::object_to_array($templates))->with('stadii_obiectiv', $stadii_obiectiv)->with('id_contract', $id_contract)->with('id_tara', $id_tara)->with('id_regiune', $id_regiune)->with('id_judet', $id_judet)->with('departamente', self::object_to_array(Confide::getDepartamenteUser()));
 }
Example #9
0
 public function LinksManager($Page = 1, $PageSize = 20, $UserID = 0)
 {
     $DB = new DB();
     if ($UserID) {
         $SqlWhere = ' WHERE CreatedUserID=' . $UserID;
     }
     $Sql = 'SELECT COUNT(ID) AS RecordCount From tbl_links ' . $SqlWhere;
     $rs = $DB->GetOne($Sql);
     if (!$rs || !$rs['RecordCount']) {
         return false;
     }
     $Data['RecordCount'] = $rs['RecordCount'];
     $Data['PageCount'] = ceil($Data['RecordCount'] / $PageSize);
     $Page = min(max(1, $Page), $Data['PageCount']);
     $Offset = ($Page - 1) * $PageSize;
     $Data['Page'] = $Page;
     $Data['PageSize'] = $PageSize;
     $Data['Data'] = $DB->Select('SELECT * FROM tbl_links ' . $SqlWhere . ' ORDER BY ID DESC', $Offset, $PageSize);
     return $Data;
 }
Example #10
0
 public function UpdateCache()
 {
     $DB = new DB();
     $sql = 'SELECT * from tbl_variables';
     $rs = $DB->Select($sql);
     if ($rs) {
         foreach ($rs as $list) {
             if ($list['VariableType']) {
                 $list['Value'] = $this->StringToArray($list['VariableValue']);
             } else {
                 $list['Value'] = $list['VariableValue'];
             }
             $Data[$list['VariableName']] = $list;
         }
         $source .= '$Data=' . var_export($Data, true) . ";\n";
         $source = '<?php ' . "\n" . $source . "?>";
         $result = false;
         $filepath = DocumentRoot . '/Data/Config/Variables.cfg.php';
         $f = @fopen($filepath, 'ab+');
         if ($f) {
             @flock($f, LOCK_EX);
             fseek($f, 0);
             ftruncate($f, 0);
             $tmp = @fwrite($f, $source);
             if (!($tmp === FALSE)) {
                 $result = true;
             }
             @fclose($f);
         } else {
             return false;
         }
         @chmod($filepath, 0777);
         return $result;
     }
     return false;
 }
Example #11
0
 public function getEditEtapa($id_etapa)
 {
     $etapa = DB::Select("SELECT \n            epl.id_etapa,\n            epl.termen_predare,\n            epl.id_um_timp,\n            epl.instiintare_contractor,\n            epl.nr_etapa,           \n            epl.id_obiectiv,\n            date_format(epl.data_start, '%d-%m-%Y') AS data_start \n            FROM etape_predare_livrabile epl            \n            WHERE epl.logical_delete = 0\n            AND epl.id_etapa = :id_etapa", array('id_etapa' => $id_etapa));
     $ums_timp = self::getUMTimp();
     return View::make('etape_termene.edit')->with('ums_timp', $ums_timp)->with('etapa', $etapa[0]);
 }
Example #12
0
 public function support_ocsc_excel()
 {
     if (Session::get('level') != '') {
         $y = DB::Select(' select year(order_date) as year1 from s_salary_ocsc_detail group by year(order_date) order by year(order_date) desc ');
         return View::make('report.report7', array('data' => $y));
     } else {
         return View::make('login.index');
     }
 }
Example #13
0
 function Topics($offset = 0, $limit = 20, $AreaID = -1)
 {
     $DB = new DB();
     if ($AreaID >= 0) {
         if ($AreaID) {
             $NextAreaID = GetNextAreaID($AreaID);
         }
         $sql_ext = 'AreaID=0';
         if ($NextAreaID) {
             $sql_ext .= ' OR (AreaID>=' . $AreaID . ' AND AreaID<' . $NextAreaID . ')';
         }
         if ($sql_ext) {
             $sql_ext = 'WHERE ' . $sql_ext;
         }
     }
     $sql = 'select * from tbl_topics ' . $sql_ext . ' ORDER BY TopicID DESC';
     return $DB->Select($sql, $offset, $limit);
 }
Example #14
0
        $this->Where($conditionData, " AND ");
        return $this;
    }
    public function _Or($conditionData)
    {
        if (!($this->lastShackle == "Where")) {
            return setError(3);
        }
        $this->Where($conditionData, " OR ");
        return $this;
    }
    private function setError($msg)
    {
        $this->Error = $this->errorMsg[$msg];
        return false;
    }
    private function isAssoc($arr)
    {
        return array_keys($arr) !== range(0, count($arr) - 1);
    }
}
$DB = new DB();
//$a = $DB->Select("client")->SetData(array("id","name"))->Exec();
$data = array("name" => "Test", "lastname" => "Testing", "status" => 1);
$a = $DB->Select("client")->SetData(array("id", "CONCAT(name,' ',lastname) as nombre", "status"))->Exec();
//$a = $DB->Delete("client")->Where(["name","=","test"])->Exec();
if (!$a) {
    echo "<p style='color:red'> {$DB->Error} </p>";
} else {
    var_dump($a);
}
Example #15
0
 public function GetAll($MysqlWhere = '')
 {
     $DB = new DB();
     return $DB->Select('select * from ' . $this->TableName . ' ' . $MysqlWhere . ' order by ' . $this->KeyID . ' DESC');
 }
Example #16
0
 public function GetProjectLists($MysqlWhere = '', $From = 0, $Pagesize = 10)
 {
     $DB = new DB();
     return $DB->Select('select * from ' . $this->TableName . ' ' . $MysqlWhere . ' order by ' . $this->KeyID . ' DESC  limit ' . $From . ',' . $Pagesize);
 }
Example #17
0
 /**
  * function name : view_manager
  * edit view_manager unitcode money
  * get
  */
 public function view_manager($y, $m, $u)
 {
     //----- sso ----//
     if ($m == 1) {
         $y_s = $y - 1;
         $m_s = 12;
     } else {
         $y_s = $y;
         $m_s = $m - 1;
     }
     //----- ot ----//
     if ($m == 12) {
         $y_t = $y + 1;
         $m_t = 1;
     } else {
         $y_t = $y;
         $m_t = $m + 1;
     }
     $sql = ' select s1.unitname, a.y, a.m, s1.cid, a.type, concat(n1.pname,"",n1.fname," ",n1.lname) as fullname, a.salary, a.r_c ';
     $sql .= ' , a.ot, a.no_v, a.ch8, a.sp_other, a.son, a.u_travel, a.u_other ';
     $sql .= ' from s_unit_costs_emp s1 ';
     $sql .= ' left join ';
     $sql .= ' ( ';
     $sql .= ' ( select cid,year(order_date) as y, month(order_date) as m, 1 as type, sum(salary+salary_other) as salary, 0 as r_c, (select c.ot from s_salary_detail c where year(c.order_date)=' . $y_t . ' and month(c.order_date)=' . $m_t . ' and c.cid=s_salary_detail.cid) as ot, sum(no_v) as no_v, sum(ch8) as ch8, ((select b.salary_sso from s_salary_detail b where year(b.order_date)=' . $y_s . ' and month(b.order_date)=' . $m_s . ' and b.cid=s_salary_detail.cid)+pts) as sp_other, 0 as son, sum(u_travel) as u_travel, sum(u_other) as u_other from s_salary_detail where year(order_date)=' . $y . ' and month(order_date)=' . $m . '  group by cid  ) ';
     $sql .= ' union ';
     $sql .= ' ( select cid,year(order_date) as y, month(order_date) as m, 2 as type, sum(salary+r_other+special_m) as salary, sum(r_c) as r_c, (select c.ot from s_salary_ocsc_detail c where year(c.order_date)=' . $y_t . ' and month(c.order_date)=' . $m_t . ' and c.cid=s_salary_ocsc_detail.cid) as ot, sum(no_v) as no_v, sum(ch8) as ch8, sum(save_h+p_other+pts) as sp_other, sum(r_pt+son) as son, sum(u_travel) as u_travel, sum(u_other) as u_other  from s_salary_ocsc_detail where year(order_date)=' . $y . ' and month(order_date)=' . $m . ' group by cid ) ';
     $sql .= ' ) as a ';
     $sql .= ' on a.cid = s1.cid ';
     $sql .= ' left join n_datageneral n1 on n1.cid=s1.cid ';
     $sql .= ' where s1.unitname="' . $u . '" ';
     //return $sql;
     $data = DB::Select($sql);
     return View::make('unitcosts.view_unitcosts_manager', array('data' => $data));
 }
<?php

$idAccidente = $_GET['idAccidente'];
$consulta = DB::Select('SELECT nombreCompletoTercero, idAccidente from accidente a left join tercero t on a.Tercero_idEmpleado = t.idTercero where idAccidente = ' . $idAccidente);
$row = array();
foreach ($consulta as $key => $value) {
    foreach ($value as $datoscampo => $campo) {
        $row[$key][] = $campo;
    }
}
$output['aaData'] = $row;
echo json_encode($output);
?>


 /**
  * function name : header_dep_create
  * create header department
  * get
  */
 public function header_dep_create()
 {
     //get Department details
     $dep_Name = Input::get('dep_Name');
     $header_Name = Input::get('header_Name');
     if ($dep_Name != '' && $header_Name != '') {
         $cid = DB::table('n_datageneral')->where(DB::raw('CONCAT(pname,"",fname, " ", lname)'), '=', $header_Name)->first();
         $header = DB::insert('insert into n_department_header (departmentName, cid, header_name) values (?, ?, ?)', array($dep_Name, $cid->cid, $header_Name));
         $department = DB::table('n_department')->get(array(DB::raw('departmentName as value')));
         foreach ($department as $k2 => $v2) {
             $return_department[] = $v2;
         }
         $dataUser = DB::table('n_datageneral')->get(array(DB::raw('CONCAT(pname,"",fname, " ", lname) as value')));
         foreach ($dataUser as $k2 => $v2) {
             $return_dataUser[] = $v2;
         }
         $header_data = DB::Select('select * from n_department_header order by departmentName');
         //view page create
         return View::make('header_dep.home_header', array('departmentall' => $return_department, 'dataUser' => $return_dataUser, 'header_data' => $header_data));
     } else {
         return Redirect::to('admin/header_dep');
     }
 }
Example #20
0
 public function continuous_home4()
 {
     if (Session::get('level') != '') {
         $y = DB::Select(' select year(order_date) as year1 from s_salary_detail group by year(order_date) order by year(order_date) desc ');
         return View::make('tax.continuous_home4', array('data' => $y));
     } else {
         return View::make('login.index');
     }
 }
<?php

$idActa = $_GET['idActa'];
$consulta = DB::Select('SELECT nombreCompletoTercero, idActaCapacitacion, idActaCapacitacionAsistente from actacapacitacion ac left join actacapacitacionasistente aca on aca.ActaCapacitacion_idActaCapacitacion = ac.idActaCapacitacion left join tercero t on aca.Tercero_idAsistente = t.idTercero where idActaCapacitacion = ' . $idActa);
$row = array();
foreach ($consulta as $key => $value) {
    foreach ($value as $datoscampo => $campo) {
        $row[$key][] = $campo;
    }
}
$output['aaData'] = $row;
echo json_encode($output);
?>


Example #22
0
 public static function getCampaignAppAction($campaignID, $edit = false)
 {
     $actions_content = '';
     $c_id = Helpers::getUniqueCampaignID($campaignID);
     $rs = DB::Select("SELECT campaignstatus,approvalstatus FROM tbl_campaigns WHERE id = ?", array($campaignID));
     /*
      * Edit and Rejected Options for Entre
      */
     if (!Helpers::isCampaignComplete($campaignID) && strtoupper(Session::get('account_type')) == 'ENTREPRENEUR' && !$edit) {
         $actions_content .= '<li>' . Helpers::getCampaignAction($campaignID) . '</li>';
     } elseif (Helpers::isCampaignComplete($campaignID) && strtoupper($rs[0]->approvalstatus) == 'PENDING' && strtoupper($rs[0]->campaignstatus) != 'PUBLISHED' && Session::get('account_type') == 'ENTREPRENEUR') {
         $actions_content .= (!$edit ? '<li>' . Helpers::getCampaignAction($campaignID) . '</li>' : '') . '<a href="javascript:submitAction(\'' . URL() . '/campaign/Publish/' . $c_id . '\')" class="Cpcomment">Publish</a>
                             </li>';
     } elseif (Helpers::isCampaignComplete($campaignID) && strtoupper($rs[0]->approvalstatus) == 'PENDING' && strtoupper($rs[0]->campaignstatus) == 'PUBLISHED' && Session::get('account_type') == 'ADMIN') {
         $actions_content .= '<li><a href="javascript:submitAction(\'' . URL() . '/campaign/Approve/' . $c_id . '\')" class="Cpcomment">Approve</a></li>
                             <li><a href="javascript:submitAction(\'' . URL() . '/campaign/Reject/' . $c_id . '\')" class="Cpcomment">Mark for review</a></li>
                             <li><a href="javascript:submitAction(\'' . URL() . '/campaign/Deactivate/' . $c_id . '\')" class="Cpcomment">Reject</a></li>';
     } else {
         $actions_content = '';
     }
     if ($actions_content != '') {
         $actions = '<div class="btn-group">
         <button type="button" class="btn btn-warning btn-flat btn-sm">Campaign Action</button>
         <button type="button" class="btn btn-warning btn-flat dropdown-toggle btn-sm" data-toggle="dropdown">
         <span class="caret"></span>
         <span class="sr-only">Toggle Dropdown</span>
         </button>
         <ul class="dropdown-menu" role="menu">';
         $actions .= $actions_content . '</ul></div>';
     } else {
         $actions = '<div style="height:29px"></div>';
     }
     return $actions;
 }
Example #23
0
 public static function getMsgCount($message_hash)
 {
     $rs = DB::Select("select count(message_hash) as messages from mradi_messages where `mradi_messages`.`target_user_id` = ? and message_hash = ? and status = 0", array(Session::get('account_id'), $message_hash));
     return $rs[0]->messages;
 }
<?php

$idElemento = $_GET['idElemento'];
$consulta = DB::Select('SELECT nombreCompletoTercero, idEntregaElementoProteccion from entregaelementoproteccion ep left join tercero t on ep.Tercero_idTercero = t.idTercero where idEntregaElementoProteccion = ' . $idElemento);
$row = array();
foreach ($consulta as $key => $value) {
    foreach ($value as $datoscampo => $campo) {
        $row[$key][] = $campo;
    }
}
$output['aaData'] = $row;
echo json_encode($output);
?>


<?php

$idGrupo = $_GET['idGrupo'];
$consulta = DB::Select('SELECT nombreCompletoTercero, idConformacionGrupoApoyo, idConformacionGrupoApoyoJurado from conformaciongrupoapoyojurado cgaj left join tercero t on t.idTercero = cgaj.Tercero_idJurado left join conformaciongrupoapoyo cga on cgaj.ConformacionGrupoApoyo_idConformacionGrupoApoyo = cga.idConformacionGrupoApoyo where ConformacionGrupoApoyo_idConformacionGrupoApoyo = ' . $idGrupo);
$row = array();
foreach ($consulta as $key => $value) {
    foreach ($value as $datoscampo => $campo) {
        $row[$key][] = $campo;
    }
}
$output['aaData'] = $row;
echo json_encode($output);
<?php

$idInspeccionDetalle = $_POST['idInspeccionDetalle'];
$imageInsp = DB::Select('SELECT fotoInspeccionDetalle from inspecciondetalle where idInspeccionDetalle = ' . $idInspeccionDetalle);
$img = get_object_vars($imageInsp[0]);
echo json_encode($img);
Example #27
0
 public function SelectLists($MysqlWhere = '')
 {
     $DB = new DB();
     return $DB->Select('select * from ' . $this->TableName . ' ' . $MysqlWhere);
 }
Example #28
0
															   <div class="form-group">
														        	<div class="input-group">
														            	<div class="dropzone dropzone-previews" id="dropzoneTerceroArchivo"></div>  
														        	</div>
														    	</div>
															</div>
														</div>	
													</div>
												</div>
											</div>
											<center>
												<div style="border: 1px solid; width:80%; height:300px;">		
												<?php 
if ($idTerceroA != '') {
    $eliminar = '';
    $archivoSave = DB::Select('SELECT * from terceroarchivo where Tercero_idTercero = ' . $idTerceroA);
    for ($i = 0; $i < count($archivoSave); $i++) {
        $archivoS = get_object_vars($archivoSave[$i]);
        echo '<div id="' . $archivoS['idTerceroArchivo'] . '" style="width:50%; height:50%; border:1px solid; float:left;"> <center>
														<a target="_blank" href="http://' . $_SERVER["HTTP_HOST"] . '/imagenes' . $archivoS['rutaTerceroArchivo'] . '"><img src="http://' . $_SERVER["HTTP_HOST"] . '/imagenes' . $archivoS['rutaTerceroArchivo'] . '"  width="25%"></a></center>';
        $eliminar .= $archivoS['idTerceroArchivo'] . ',';
        echo ' <a style="cursor:pointer;" onclick="eliminarDiv(document.getElementById(' . $archivoS['idTerceroArchivo'] . ').id);">Borrar archivo</a>

														<input type="hidden" id="idTerceroArchivo[]" name="idTerceroArchivo[]" value="' . $archivoS['idTerceroArchivo'] . '" >

														<input type="hidden" id="tituloTerceroArchivo[]" name="tituloTerceroArchivo[]" value="' . $archivoS['tituloTerceroArchivo'] . '" >

														<input type="hidden" id="fechaTerceroArchivo[]" name="fechaTerceroArchivo[]" value="' . $archivoS['fechaTerceroArchivo'] . '" >

														
														<input type="hidden" id="rutaTerceroArchivo[]" name="rutaTerceroArchivo[]" value="' . $archivoS['rutaTerceroArchivo'] . '" ></div>';
Example #29
0
function UpdateAreaGroupID($ParentAreaID, $GroupID)
{
    $DB = new DB();
    $sql = 'UPDATE `tbl_location` SET GroupID=' . $GroupID . ' WHERE AreaID=' . $ParentAreaID;
    if ($DB->Update($sql)) {
        $sql = 'Select AreaID FROM `tbl_location` WHERE ParentAreaID=' . $ParentAreaID;
        $rs = $DB->Select($sql);
        if ($rs) {
            foreach ($rs as $list) {
                UpdateAreaGroupID($list['AreaID'], $GroupID);
            }
        }
    }
}
                border-radius: 4px;
            }
</style> 
<?php 
$visible = '';
if (isset($datos[0])) {
    $dato = get_object_vars($datos[0]);
    if ($dato['adicionarRolOpcion'] == 1) {
        $visible = 'inline-block;';
    } else {
        $visible = 'none;';
    }
} else {
    $visible = 'none;';
}
$lineaNegocio = DB::Select('SELECT idLineaNegocio, nombreLineaNegocio from lineanegocio');
?>
        <div class="container">
            <div class="row">
                <div class="container">
                    <br>
                    <div class="btn-group" style="margin-left: 94%;margin-bottom:4px" title="Columns">
                        <button type="button" class="btn btn-default dropdown-toggle"data-toggle="dropdown">
                            <i class="glyphicon glyphicon-th icon-th"></i> 
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                            <li><a class="toggle-vis" data-column="0"><label> Iconos</label></a></li>
                            <li><a class="toggle-vis" data-column="1"><label> ID</label></a></li>
                            <li><a class="toggle-vis" data-column="2"><label> Fecha Inicial</label></a></li>
                            <li><a class="toggle-vis" data-column="3"><label> Fecha Final</label></a></li>