41$sql =
"SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX.
"c_format_cards";
42$sql .=
" WHERE active=1 ORDER BY code ASC";
43$resql =
$db->query($sql);
45 while ($row =
$db->fetch_array($resql)) {
46 $_Avery_Labels[$row[
'code']][
'name'] = $row[
'name'];
47 $_Avery_Labels[$row[
'code']][
'paper-size'] = $row[
'paper_size'];
48 $_Avery_Labels[$row[
'code']][
'orientation'] = $row[
'orientation'];
49 $_Avery_Labels[$row[
'code']][
'metric'] = $row[
'metric'];
50 $_Avery_Labels[$row[
'code']][
'marginLeft'] = $row[
'leftmargin'];
51 $_Avery_Labels[$row[
'code']][
'marginTop'] = $row[
'topmargin'];
52 $_Avery_Labels[$row[
'code']][
'NX'] = $row[
'nx'];
53 $_Avery_Labels[$row[
'code']][
'NY'] = $row[
'ny'];
54 $_Avery_Labels[$row[
'code']][
'SpaceX'] = $row[
'spacex'];
55 $_Avery_Labels[$row[
'code']][
'SpaceY'] = $row[
'spacey'];
56 $_Avery_Labels[$row[
'code']][
'width'] = $row[
'width'];
57 $_Avery_Labels[$row[
'code']][
'height'] = $row[
'height'];
58 $_Avery_Labels[$row[
'code']][
'font-size'] = $row[
'font_size'];
59 $_Avery_Labels[$row[
'code']][
'custom_x'] = $row[
'custom_x'];
60 $_Avery_Labels[$row[
'code']][
'custom_y'] = $row[
'custom_y'];
67foreach ($_Avery_Labels as $key => $val) {
68 $_Avery_Labels[$key][
'name'] .=
' ('.$_Avery_Labels[$key][
'paper-size'].
' - '.$_Avery_Labels[$key][
'NX'].
'x'.$_Avery_Labels[$key][
'NY'].
')';
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...