function transfer_feedback() { $id = F3::get("PARAMS.id"); $vehicle = new Axon("vehicle"); $vehicle->load(array('id=:id', array(':id' => $id))); $zone_id = $vehicle->zone_id; $wheeler = $vehicle->wheeler; $dates = $vehicle->date; $date = DB::sql("SELECT DATE_ADD( date, INTERVAL 15 DAY ) AS ds FROM vehicle WHERE id='{$id}' and date='{$dates}'"); $dt = new Form_elements(); $nepDate = $dt->dateConvertEn($date[0]["ds"]); // var_dump($date[0]["ds"]);die; //echo $nepDate;die; $zone = Admin::getZone($vehicle->zone_id); $symbol = Admin::getSymbolType($vehicle->vehicle_symbol_type); $vehicleNo = $zone . $vehicle->lot_number . $symbol . $vehicle->number; $zone = new Axon("zonal_office"); if ($zone->found(array('zone_id=:id and wheeler=:vid', array(':id' => $zone_id, ':vid' => $wheeler))) > 0) { $zone->load(array('zone_id=:id and wheeler=:vid', array(':id' => $zone_id, ':vid' => $wheeler))); $photos = new Axon("owner_photo"); if ($photos->found(array('vehicle_id =:id', array(':id' => $id)))) { $photos->load(array('vehicle_id =:id', array(':id' => $id))); F3::set('pic', $photos); } else { F3::set('pic', 'no photo available'); } F3::set('date', $nepDate); F3::set('refer', $id); F3::set('vehicle', $vehicleNo); F3::set('value', $zone->name); F3::set('navUser', 'userNav'); F3::set('template', 'feedbacktransfer'); echo Template::serve("template/layout.html"); } else { $photos = new Axon("owner_photo"); if ($photos->found(array('vehicle_id =:id', array(':id' => $id)))) { $photos->load(array('vehicle_id =:id', array(':id' => $id))); F3::set('pic', $photos); } else { F3::set('pic', 'no photo available'); } F3::set('date', $nepDate); F3::set('refer', $id); F3::set('navUser', 'userNav'); F3::set('value', 'no office available'); F3::set('template', 'feedbacktransfer'); echo Template::serve("template/layout.html"); } }
function transfer() { if (!F3::get('SESSION.onlineUser')) { F3::reroute("/"); } $dateNep = new Form_elements(); //transfer information of the vehicle $id = date('siGjnty') . rand(1, 100); $ip_address = $_SERVER['REMOTE_ADDR']; $wheeler = F3::get("POST.wheeler"); $zone_id = F3::get("POST.zone_id"); $lot_number = F3::get("POST.lot_number"); $vehicle_symbol_type = $wheeler == 21 ? F3::get("POST.vehicle_symbol_type_two") : F3::get("POST.vehicle_symbol_type_four"); $number = F3::get("POST.number"); $vehicleid = $this->vehicleid($wheeler, $zone_id, $lot_number, $vehicle_symbol_type, $number); $reason = F3::get("POST.reason"); $dates = F3::get("POST.date"); $date = $dateNep->dateConvertEn($dates); $remarks = F3::get("POST.remarks"); $witness_name = F3::get("POST.witness_name"); $witness_address = F3::get("POST.witness_address"); $citizenship_no = F3::get("POST.citizenship_no"); //owner information $owner_type = F3::get("POST.owner_type"); $first_name = F3::get("POST.first_name"); $last_name = F3::get("POST.last_name"); $father_name = F3::get("POST.father_name"); $grandfather_name = F3::get("POST.grandfather_name"); $dob = F3::get("POST.dob"); $reg_num = F3::get("POST.reg_num"); $email = F3::get("POST.email"); $mobile = F3::get("POST.mobileno"); $p_zone_id = F3::get("POST.p_zone_id"); $p_district_id = F3::get("POST.p_district_id"); $p_metropolitan = F3::get("POST.p_metropolitan"); $p_ward_no = F3::get("POST.p_ward_no"); $p_address = F3::get("POST.p_address"); $p_house_no = F3::get("POST.p_house_no"); $p_phone = F3::get("POST.p_phone"); $temp_zone_id = F3::get("POST.temp_zone_id"); $temp_district_id = F3::get("POST.temp_district_id"); $temp_metropolitan = F3::get("POST.temp_metropolitan"); $temp_ward_no = F3::get("POST.temp_ward_no"); $temp_address = F3::get("POST.temp_address"); $temp_house_no = F3::get("POST.temp_house_no"); $temp_phone = F3::get("POST.temp_phone"); $nabalik_guardian_name = F3::get("POST.nabalik_guardian_name"); $nabalik_relation = F3::get("POST.nabalik_relation"); $nabalik_identity_no = F3::get("POST.nabalik_identity_no"); $nabalik_district = F3::get("POST.nabalik_district"); $nabalik_year = F3::get("POST.nabalik_year"); $nabalik_address = F3::get("POST.nabalik_address"); $bank_name = F3::get("POST.bank_name"); $creditor_name = F3::get("POST.creditor_name"); $creditor_district = F3::get("POST.creditor_district"); $creditor_year = F3::get("POST.creditor_year"); $creditor_address = F3::get("POST.creditor_address"); $per_nagarikta = F3::get("POST.per_nagarikta"); $per_identificationno = F3::get("POST.per_identificationno"); $per_district = F3::get("POST.per_district"); $per_year = F3::get("POST.per_year"); $indian_identificationno = F3::get("POST.indian_identificationno"); $other_identificationno = F3::get("POST.other_identificationno"); $captcha = F3::get("POST.code"); if ($captcha == F3::get("SESSION.captcha")) { $this->pictureFolder($id); $sqls[] = "INSERT INTO vehicle (id,wheeler,vehicleid,zone_id,lot_number,vehicle_symbol_type,number,ip_address,form_type) VALUES('{$id}','{$wheeler}','{$vehicleid}','{$zone_id}',' {$lot_number}','{$vehicle_symbol_type} ','{$number}','{$ip_address}','namsari')"; $sqls[] = "INSERT INTO owner (vehicleid,owner_type,first_name,last_name, father_name,grandfather_name,\n dob,reg_num,email,mobileno,p_zone_id,p_district_id, p_metropolitan,p_ward_no,\n p_address, p_house_no, p_phone, temp_zone_id,temp_district_id, temp_metropolitan,\n temp_ward_no, temp_address,temp_house_no, temp_phone, nabalik_guardian_name,nabalik_relation,\n nabalik_identity_no, nabalik_district, nabalik_year, nabalik_address, bank_name, creditor_name,\n creditor_district, creditor_year, creditor_address,per_nagarikta,per_identificationno,per_district,per_year,indian_identificationno,other_identificationno)\n VALUES( '{$id}','{$owner_type}','{$first_name}','{$last_name}','{$father_name}','{$grandfather_name}',\n '{$dob}','{$reg_num}','{$email}','{$mobile}','{$p_zone_id}','{$p_district_id}','{$p_metropolitan}','{$p_ward_no}','{$p_address}',\n '{$p_house_no}', '{$p_phone}','{$temp_zone_id}','{$temp_district_id}','{$temp_metropolitan}','{$temp_ward_no}',\n '{$temp_address}',' {$temp_house_no}',' {$temp_phone}', '{$nabalik_guardian_name}',' {$nabalik_relation}',\n '{$nabalik_identity_no}','{$nabalik_district}','{$nabalik_year}','{$nabalik_address}','{$bank_name}',\n '{$creditor_name}','{$creditor_district}','{$creditor_year}','{$creditor_address}','{$per_nagarikta}',\n '{$per_identificationno}','{$per_district}','{$per_year}','{$indian_identificationno}' ,'{$other_identificationno}')"; $sqls[] = "INSERT INTO namsari (vehicle_id,reason,date,remarks,witness_name,witness_address,citizenship_no) VALUES('{$id}','{$reason}','{$date}','{$remarks}','{$witness_name}','{$witness_address}','{$citizenship_no}')"; DB::sql($sqls); F3::reroute("/feedbackt/{$id}"); } else { F3::set('error', 'The captcha you have entered is wrong'); $this->transfer_ownership(); } }
function transfer_print() { $id = new Form_elements(); $type_symbol = $id->type_symbol(); // $owner_type = $id->owner_type(); // // $zone_code = $id->zone_code(); // $district_code = $id->district_code(); // $date = DATE('Y-m-d'); $vehicle = F3::get("PARAMS.id"); $data = new Axon("vehicle"); $owner = new Axon("owner"); $namsari = new Axon("namsari"); if ($data->found(array('id=:id', array(':id' => $vehicle))) && $owner->found(array('vehicleid =:id', array(':id' => $vehicle))) && $namsari->found(array('vehicle_id =:id', array(':id' => $vehicle)))) { // die; $data->load(array('id=:id', array(':id' => $vehicle))); $owner->load(array('vehicleid =:id', array(':id' => $vehicle))); $namsari->load(array('vehicle_id =:id', array(':id' => $vehicle))); $zone_code = $id->zone_view($data->zone_id); F3::set('zcode', $zone_code); $symbol_view = $id->symbol_view($data->vehicle_symbol_type); $owner_view = $id->owner_view($owner->owner_type); $p_zone_id = $id->zone_view($owner->p_zone_id); F3::set('p_zone', $p_zone_id); $temp_zone_id = $id->zone_view($owner->temp_zone_id); F3::set('t_zone', $temp_zone_id); $p_district_id = $id->district_view($owner->p_district_id); $temp_district_id = $id->district_view($owner->temp_district_id); $nabalik_district = $id->district_view($owner->nabalik_district); $creditor_district = $id->district_view($owner->creditor_district); $per_district = $id->district_view($owner->per_district); $per_identity = $owner->per_nagarikta; if ($per_identity == '1') { $per_identity = 'Nepali'; } if ($per_identity == '2') { $per_identity = 'Indian'; } if ($per_identity == '3') { $per_identity = 'Other'; } F3::set('nationality', $per_identity); $owner->copyTo("POST"); $data->copyTo("POST"); $namsari->copyTo("POST"); // F3::set('owner',$owner->owner_type); F3::set('date', $date); // F3::set('nav', 'navigation'); echo Template::serve('template/admin/transfer_print.htm'); } }
function getSavedNamsari() { if (!F3::get('SESSION.onlineUser')) { F3::reroute("/"); } $id = new Form_elements(); $date = DATE('Y-m-d'); $id = new Form_elements(); $owner_type = $id->owner_type(); $zone_code = $id->zone_code(); $district_code = $id->district_code(); $date = DATE('Y-m-d'); $zone_code = $id->zone_code(); $type_symbol = $id->type_symbol(); $vehicle = F3::get("PARAMS.trans"); $data = new Axon("vehicle"); $owner = new Axon("owner"); $namsari = new Axon("namsari"); if ($data->found(array('id=:id', array(':id' => $vehicle))) && $owner->found(array('vehicleid =:id', array(':id' => $vehicle))) && $namsari->found(array('vehicle_id=:id', array(':id' => $vehicle)))) { $data->load(array('id=:id', array(':id' => $vehicle))); $owner->load(array('vehicleid =:id', array(':id' => $vehicle))); $namsari->load(array('vehicle_id =:id', array(':id' => $vehicle))); $owner_photo = new Axon("owner_photo"); if ($owner_photo->found(array('vehicle_id=:pic', array(':pic' => $vehicle)))) { $owner_photo->load(array('vehicle_id=:pic', array(':pic' => $vehicle))); $owner_photo->copyTo("POST"); } // var_dump($data->find("id='$vehicle'"));die; $data->copyTo("POST"); $owner->copyTo("POST"); $namsari->copyTo("POST"); F3::set('heading', 'नया सवारी धनी विवरण '); F3::set('date', $date); F3::set('navUser', 'userNav'); F3::set('title', 'Admin - approve Namsari'); F3::set('template', 'transfer'); echo Template::serve("template/layout.html"); } }
function viewNamsari() { if (!F3::get('SESSION.asid')) { F3::reroute("/admin"); } $id = new Form_elements(); $date = DATE('Y-m-d'); $id = new Form_elements(); $owner_type = $id->owner_type(); $zone_code = $id->zone_code(); $district_code = $id->district_code(); $date = DATE('Y-m-d'); $zone_code = $id->zone_code(); $type_symbol = $id->type_symbol(); $vehicle = F3::get("PARAMS.id"); $data = new Axon("vehicle"); $owner = new Axon("owner"); $owner_photo = new Axon("owner_photo"); $namsari = new Axon("namsari"); if ($data->found(array('id=:id', array(':id' => $vehicle))) && $owner->found(array('vehicleid =:id', array(':id' => $vehicle))) && $namsari->found(array('vehicle_id=:id', array(':id' => $vehicle))) && $owner_photo->found(array('vehicle_id=:pic', array(':pic' => $vehicle)))) { $data->load(array('id=:id', array(':id' => $vehicle))); $owner->load(array('vehicleid =:id', array(':id' => $vehicle))); $namsari->load(array('vehicle_id =:id', array(':id' => $vehicle))); $owner_photo->load(array('vehicle_id=:pic', array(':pic' => $vehicle))); $data->copyTo("POST"); $owner->copyTo("POST"); $namsari->copyTo("POST"); $owner_photo->copyTo("POST"); F3::set('heading', 'नया सवारी धनी विवरण '); F3::set('date', $date); F3::set('nav', 'navigation'); F3::set('title', 'Admin - approve Namsari'); F3::set('templateAdmin', 'viewNamsari'); echo Template::serve("template/layout.html"); } else { F3::reroute("/admin/ownershipTransfer"); } }