//echo 'empty'; $query = "CREATE TABLE section ( sec_id int(11) AUTO_INCREMENT, sec_name varchar(50) NOT NULL, sec_enable varchar(1) NOT NULL, PRIMARY KEY (sec_id) )"; executeQuery($query); $fields2 = array(); $fields2['sec_name'] = dbString("Bazar Ligeiro"); $fields2['sec_enable'] = dbInteger(1); sectionInsert($fields2); unset($fields2); $fields2 = array(); $fields2['sec_name'] = dbString('Bazar Pesado'); $fields2['sec_enable'] = dbInteger(1); sectionInsert($fields2); unset($fields2); $de = sectionGetAll(); if(empty($de)) { }else{ echo "Script executado com sucesso"; } }else{ echo 'Script não executado'; } closeDataBase(); ?>
case 3: $texto = "SMS não entregue"; break; default: $texto = "Verificar script da noite"; break; }*/ } } unset($where); unset($table); unset($data); $textmail = '<html><body>'; //$titulo = "Indiferenciado"; //$numerowhile = 0; $tablesection = sectionGetAll(); while ($sec = foreachRow($tablesection)) { $titulo = $sec['sec_name']; $numerowhile = $sec['sec_id']; $where = 'date_in >= ' . dbString($date_menos15) . ' AND date_torep IS NULL AND date_tocliente IS NULL AND id_section = ' . $numerowhile; $table = grepGetByFiltro($where, 'date_in'); $textmail .= '<h2>' . $titulo . '</h2><br/>'; $textmail .= 'Reparação pendentes <= a 15 dias que ainda não foram levantadas pelo reparador: <br/>'; if (mysql_num_rows($table) > 0) { while ($data = mysql_fetch_array($table)) { //aqui vou ir buscar o numero do fornecedor $reparador = ''; if ($data['rep_id'] > 0) { $data_rep = reparadorGetById($data['rep_id']); $reparador = $data_rep['rep_name']; } else {