'/', 'msg' => ERR_NEED_ID); // include ("includes/show-error.php"); } // 01. GET DATA NEEDED --------------------------------------------------------- // * from database // * calculate psevdo-field values //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // get totals of categories // --------------------------------------------------------------------------- $totals = get_totals(); // read fields options (json format) // --------------------------------------------------------------------------- $formARRAY = json_decode(FORMJSON); // get item record // --------------------------------------------------------------------------- // init database connection $_dbc = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_DBMS); if ($_dbc->connect_errno) { echo "Database connection failed; Please try in a few minutes. "; if (TESTING) echo $_dbc->connect_error; $_dbc->close(); die(); } $_dbc->set_charset("utf8"); // prepare statemet $_stm = $_dbc->prepare("SELECT identity, img, img2, operator, `timestamp`, record FROM items WHERE id = ?"); $_stm->bind_param("d", $item_id); // bind values $_stm->execute(); // execute query $_stm->store_result(); // store result if ($_stm->num_rows) { $_stm->bind_result($idnt, $imgfile, $imgfile2, $opr, $tm, $serREC); // bind result variables $_stm->fetch(); // fetch FIRST record values // unserialize main record to variable $record = unserialize($serREC); $it_id = explode('.', $idnt); // calculate record $record['id'] = $item_id; $record['identity'] = $idnt; $record['operator'] = $opr; $record['itemid'] = end($it_id); $record['totalitems'] = $totals[$record['ccode']]; date_default_timezone_set('Europe/Athens'); setlocale(LC_ALL, 'el_GR.UTF-8', 'grc'); $record['timestamp'] = local_dt($tm); // calculate about image if (strlen($imgfile) > 9) { $has_image = true; $sub_dir = intdiv($item_id,FOLDER_CPC) .'/'; $image = '/'. UPLOAD_DIR . $sub_dir . $imgfile; $thumb = '/'. UPLOAD_DIR . $sub_dir .'pi'. $imgfile; } else $has_image = false; // calculate about image2 if (strlen($imgfile2) > 9) { $has_image2 = true; $sub_dir = intdiv($item_id,FOLDER_CPC) .'/'; $image2 = '/'. UPLOAD_DIR . $sub_dir . $imgfile2; $thumb2 = '/'. UPLOAD_DIR . $sub_dir .'pi'. $imgfile2; } else $has_image2 = false; } $_stm->close(); // close statement $_dbc->close(); // close connection // 02. RENDER HTML and DATA ---------------------------------------------------- // * Draw fileds from Json Array per section // * Put data from Record //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ?> <?=PROJECT?> : Προεπισκόπιση Εγγραφής

Προεπισκόπιση Εγγραφής

Αριθμός Ταυτότητας αντικειμένου: Επεξεργασία EDITOR) : ?> Εκτύπωση καρτέλας


Φωτογραφίες αντικειμένου

No Image



Με την επισύναψη διαγράφεται τυχον παλιά φωτογραφία.
No Image



Με την επισύναψη διαγράφεται τυχον παλιά φωτογραφία.
$section) : ?>

label?>

childs as $key => $field) : ?> len)) ? ' col-md-'.$field->len : 'col-md-12'; // column class (for width) ?>
lab?> : nam, $record[$field->nam]); // parse field + current value $txt = $fdata['multi'] ? implode(", ", $fdata['value']) : $fdata['value']; // if array of values, implode values // handle ccode // btw. get 'general' local-name if ($field->nam == 'ccode') { $cc = parse_ccode($record[$field->nam]); // $piMore = $cc->local; $localname = $cc->local; } // --- depricated: new field was set (localname) // else $piMore = ""; // handle local-name if ($field->nam == 'localname') { // if a localname was explicity set use it; otherwise (if empty) use the 'general' one if (trim($txt) == "") { $txt = $localname; } } ?> nam == 'ccode') || ($field->nam == 'identity')) : ?> ()

Συμπληρωματική Πληροφορία nam, $record['note']); // parse field + current value $txt = $fdata['value']; // if array of values, implode values ?>

Επεξεργασία Εγγραφής