vbz Posted October 7, 2014 Report Share Posted October 7, 2014 (edited) kontrolierim neizvada parastu dropdown, tas ir tukšs, man uz 5.2.x klons visu izvada, 5,3.x,, atgriež tukšu $sortiment_data function add($msg='') { $query = $this->membership_model->get_data(); //var_dump($query)); exit(); $this->data['header'] = $this->load->view('includes/header', array('data' => $query[0]), true); $this->data['footer'] = $this->load->view('includes/footer', array(), true); $add_last = $this->session->userdata('add_last'); if(isset($add_last) and is_array($add_last) and (int)$add_last['flip_flap_nr'] < 4){ $data = $add_last; $data['flip_flap_nr'] = $data['flip_flap_nr'] + 1; } else { $data = array( 'contract_nr' => '', 'DU_nr' => '', 'delivery_place' => '', 'auto_nr' => '', 'flip_flap_nr' => 1, 'sortiment' => '' ); } switch($query[0]->group_id) { case 1: $sortiment_data = $this->sortiment_model->get_sortiment_all(); break; case 2: $sortiment_data = $this->sortiment_model->get_sortiment_manager($query[0]->id); break; case 3: $sortiment_data = $this->sortiment_model->get_sortiment_manager($query[0]->parent_id); break; default: break; } $sortiment = $this->_sortiment($sortiment_data); $this->data['content'] = $this->load->view('add', array('sortiment' => $sortiment, 'data' => $data, 'message' => $msg), true); $this->load->view('includes/template', $this->data); } view <div id="add-measure-form"> <?php echo form_open('truckmeasure/add_measure'); echo form_fieldset(); echo validation_errors('<p class="error">'); echo $message; echo form_label('Līguma Nr:', 'contract_nr'); echo form_input('contract_nr', set_value('contract_nr', $data['contract_nr']), 'maxlenght="9"'); echo form_label('Darba uzdevuma Nr:', 'DU_nr'); echo form_input('DU_nr', set_value('DU_nr', $data['DU_nr']), 'maxlenght="7"'); echo form_label('Piegādes vieta:', 'delivery_place'); echo form_input('delivery_place', set_value('delivery_place', $data['delivery_place']), 'maxlenght="50"'); echo form_label('Automašīnas Nr:', 'auto_nr'); echo form_input('auto_nr', set_value('auto_nr', $data['auto_nr']), 'maxlenght="10"'); echo form_label('Kūleņa Nr:', 'flip_flap_nr'); echo form_dropdown('flip_flap_nr', array(1 => 'Nr. 1', 2 => 'Nr. 2', 3 => 'Nr. 3', 4 => 'Nr. 4'), (int) $data['flip_flap_nr']); echo form_label('Sortiments:', 'sortiment'); echo form_dropdown('sortiment', $sortiment, (int)$data['sortiment']); echo form_label('Platums:', 'width'); echo form_input('width', set_value('width', ''), 'maxlenght="3"'); echo form_label('Augstums:', 'height'); echo form_input('height', set_value('height', ''), 'maxlenght="3"'); echo form_label('Garums:', 'lenght'); echo form_input('lenght', set_value('lenght', ''), 'maxlenght="4"'); echo form_label('Koeficients:', 'coefficient'); echo form_input('coefficient', set_value('coefficient', ''), 'maxlenght="2"'); echo form_submit('submit', 'Pievienot'); echo form_fieldset_close(); echo form_close(); ?> </div> aha un iebrauc uz sitiena, kkur ir nekomblitāte ar 3.5.x :uz 5.2.x strādā private function _sortiment($data){ $retval = array(); foreach($data as $value){ $retval[(int)$value['ptl']] = $value['ptl'] . ' ' . $value['abbreviation']; } return $retval; Edited October 7, 2014 by vbz Quote Link to comment Share on other sites More sharing options...
briedis Posted October 7, 2014 Report Share Posted October 7, 2014 Nu 5.2 gluži nav 5.3 http://php.net/manual/en/migration53.php Quote Link to comment Share on other sites More sharing options...
vbz Posted October 7, 2014 Author Report Share Posted October 7, 2014 Nu tā tas ir, bet varbūt te kāds ir daudz noņēmies ar migrāciju uz 5.3.x no zemākas. Tur var būt daudz knifu ,,, - testēt un debugot Quote Link to comment Share on other sites More sharing options...
briedis Posted October 7, 2014 Report Share Posted October 7, 2014 "Tur var būt daudz knifu ,,, - testēt un debugot" Nu nez, vai tad tev kādreiz ir tā gadījies, kad kods salūzt, kaut kas vairs nestrādā, kā vajag? Man liekas, ka tur ir problēma kodā, slikti uzrakstīts. Un vispār, tajā linkā ir apakšā dots: "See also the migration guides for PHP versions 5.0.x, 5.1.x, 5.2.x, 5.4.x and 5.5.x." Quote Link to comment Share on other sites More sharing options...
vbz Posted October 7, 2014 Author Report Share Posted October 7, 2014 (edited) secinājums, ātrāk būs debugot, nekā braukt visus php.net changes, kods ir vecs, bet kur tur ir abrakadabra, kods - parasts kods, nav ide''als, bet strādāja Naivi, bet ātrāk būs debug Ar savienotajību kods var nomirt uz nākošo dienu ... Konkrēti tas ir, ka veca darba vieta prasa palīdzību, un tā ir daudzreiz Edited October 7, 2014 by vbz Quote Link to comment Share on other sites More sharing options...
Kasspars Posted October 7, 2014 Report Share Posted October 7, 2014 Kaut kas ar layeriem nebūs labi Quote Link to comment Share on other sites More sharing options...
vbz Posted October 7, 2014 Author Report Share Posted October 7, 2014 Kaut kas ar layeriem nebūs labi nu viewaa ir tikai viens <div>/<div> Quote Link to comment Share on other sites More sharing options...
vbz Posted October 7, 2014 Author Report Share Posted October 7, 2014 labi, sāksim ķidāt, step by step palīdz Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 7, 2014 Report Share Posted October 7, 2014 Kaut kas ar layeriem nebūs labi 10/10. Quote Link to comment Share on other sites More sharing options...
marrtins Posted October 7, 2014 Report Share Posted October 7, 2014 Gan jau sql layeris ir aizgājis pa citu layeri. Quote Link to comment Share on other sites More sharing options...
vbz Posted October 7, 2014 Author Report Share Posted October 7, 2014 (edited) skatīsies ko moduļi velk ārā, no db, bet neticu, uz otras sistēmas strādā, te nestrādā, tas vispār posgreesql, neticu, ka konfliktēs, ter kkāds meesls uzrakatīts php, kas dumības vada Un priecājieties par savu php, bļin savienotajību pat nespēj nodrošināt Edited October 7, 2014 by vbz Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 7, 2014 Report Share Posted October 7, 2014 Pie visa ir vainīgas līkas rokas. Pat ar PHP var uzrakstīt normālu kodu, ja rokas neaug no dirsas un nesteidzas pa galvu pa kaklu. Quote Link to comment Share on other sites More sharing options...
vbz Posted October 7, 2014 Author Report Share Posted October 7, 2014 (edited) Pie visa ir vainīgas līkas rokas. Pat ar PHP var uzrakstīt normālu kodu, ja rokas neaug no dirsas un nesteidzas pa galvu pa kaklu. es tur dzejoļus rakstīšu, tas varbūt Tev labāk paliks - kur tur ir līks kods, es eju katru rindu, nav kas konfilktē. Starp citu nebrauc augumā, daudziem tā var gadīties un man augums i 1,25 tikai Līdz rītam atradīšu. Neesmu es ar php strādājis kādus 4 gadus Tur ir cita vaina. Fkts ir tāds, ka52.x strādā, 5.3 nestrāda un skatīsies tālāk, mozh tur php konfigurēts, kam kkas tagad nepietiek Lieta tāda, ka es pārmetu kodu uz localhost - viss strādā arī uz 5.3.x - tur nestrādā skatīsies konfigurācijas, es uz localhost pārliku 5.3 - iet Varbūt Tev pašam līkas rokas ... un kas šitā ir par rindu: $retval[(int)$value['ptl']] = $value['ptl'] . ' ' . $value['abbreviation']; tapēc, ka $retval jau ir masīvs kāpēc divas ]] noslēdzot masīva indeksu Edited October 7, 2014 by vbz Quote Link to comment Share on other sites More sharing options...
F3llony Posted October 7, 2014 Report Share Posted October 7, 2014 Quote Link to comment Share on other sites More sharing options...
vbz Posted October 7, 2014 Author Report Share Posted October 7, 2014 (edited) 5,3 š'du sintaksi paredz: $retval[(int)$value['ptl']], kāpēc gan nē, tas ir jautājums! paredz array_1[array[index]] - iet, tas muļķīgi tā var rakstīt vienmēr $sortiment = $this->_sortiment($sortiment_data); var_dump($sortiment); array(0) { } Edited October 7, 2014 by vbz Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.