function templateIconHtml($params, &$smarty) { if (isset($params['ico'])) { $ico = $params['ico']; } else { $ico = ''; } if (isset($params['end'])) { $end = $params['end']; } else { $end = '.png'; } if (isset($params['extra'])) { $extra = ' ' . $params['extra']; } else { $extra = ''; } return iconHTML($ico, $end, $extra); }
echo 'Følgende data var tilstede ved sletting:<br />'; } if ($thislog['log_action2'] == 'entry_undeleted') { echo 'Følgende data var tilstede ved gjenoppretting:<br />'; } echo '<a href="javascript:switchView(' . $thislog['log_id'] . ');" id="switchlink' . $thislog['log_id'] . '">' . __("hide") . '</a>' . chr(10); echo '<div id="log' . $thislog['log_id'] . '">' . chr(10); echo ' <ul>' . chr(10); echo printEntryLog($thislog, TRUE); echo ' </ul>' . chr(10); echo '</div>' . chr(10); echo '<script type="text/javascript">switchView(' . $thislog['log_id'] . ');</script>' . chr(10); } echo '</td>' . chr(10); echo ' </tr>' . chr(10); } echo '</table>' . chr(10); echo '<h2>Handlinger</h2>'; echo '<span style="font-size: 16px;">'; if (!$deleted) { echo '<a href="entry_delete.php?entry_id=' . $entry['entry_id'] . '">' . iconHTML('page_white_delete') . ' Slett booking</a></span><br>' . ' (Dette er ikke permanent. Den legges kun i et eget arkiv for slettede bookinger. Kan gjenopprettes igjen.)'; } else { echo '<a href="entry_delete.php?entry_id=' . $entry['entry_id'] . '&undelete=1">' . iconHTML('page_white_get') . ' Gjenopprett booking</a></span><br>'; } echo '</td></tr></table>'; debugAddToLog(__FILE__, __LINE__, 'entry.php finished'); debugPrintLog(); ?> <?php echo debugPrintTimeTotal();
$deactivated2 = ''; } echo ' <td class="' . $deactivated . '">' . $user['user_id'] . '</td>'; echo ' <td class="' . $deactivated . '">' . '<a href="user.php?user_id=' . $user['user_id'] . '" class="' . $deactivated2 . '">' . iconHTML('user') . ' ' . $user['user_name'] . '</a>' . '</td>' . chr(10); echo ' <td class="' . $deactivated . '">' . $user['user_name_short'] . '</td>' . chr(10); echo ' <td class="' . $deactivated . '">' . '<div class="showButton" id="buttonId' . $user['user_id'] . '"><a href="javascript:void();" class="' . $deactivated2 . '">Vis / Ikke vis</a></div>' . '<div class="showField" id="fieldId' . $user['user_id'] . '" style="display:none;">' . 'Telefon: ' . $user['user_phone'] . '<br>' . 'E-post: ' . $user['user_email'] . '<br>' . 'Stilling: ' . $user['user_position'] . '<br>'; $area_user = getArea($user['user_area_default']); if (!count($area_user)) { $area_user['area_name'] = 'IKKE FUNNET'; } echo __('Default area') . ': ' . $area_user['area_name']; '</div></td>' . chr(10); echo ' <td class="' . $deactivated . '">'; if ($login['user_access_useredit'] || $login['user_id'] == $user['user_id']) { echo '<a href="' . $_SERVER['PHP_SELF'] . '?editor=1&id=' . $user['user_id'] . '" class="' . $deactivated2 . '">' . iconHTML('user_edit') . ' ' . 'Endre bruker</a><br />'; echo '<a href="admin_user_password.php?id=' . $user['user_id'] . '" class="' . $deactivated2 . '">' . iconHTML('lock_edit') . ' ' . 'Endre passord</a>'; } else { echo ' '; } echo '</td>' . chr(10); echo ' <td>'; if (count($user) && !$user['deactivated'] && count($user['groups'])) { echo '<ul style="margin: 0;">' . chr(10); foreach ($user['groups'] as $gid) { $group = getGroup($gid); if (count($group)) { echo '<li>' . $group['group_name'] . '</li>' . chr(10); } } echo '</ul>' . chr(10); }
echo '<tr> <td align="right">' . iconHTML('monitor') . ' <b>' . _('Text on infoscreen') . ':</b> </td> <td>' . $entry['infoscreen_txt'] . '</td> </tr>' . chr(10); echo '<tr> <td align="right">' . iconHTML('monitor') . ' <b>' . _('Preview infoscreen') . ':</b> </td> <td><a href="infoskjerm.php?area=' . $entry['area_id'] . '&date=' . date('d.m.Y', $entry['time_start']) . '">' . _('Preview this evening for the current area') . ' *</td> </tr>' . chr(10); echo '<tr> <td colspan="2">* ' . _('Will only show if the event is after 16.00.') . '</td> </tr>' . chr(10); echo '<tr><td colspan="2"><br>' . chr(10); echo '<font size="3"><b>' . _('Invoice') . '</b></font>' . chr(10); echo '</td></tr>' . chr(10) . chr(10); echo '<tr> <td align="right">' . iconHTML('coins') . ' <b>' . _('Invoice') . '?</b> </td> <td>'; if ($entry['invoice']) { echo _('yes'); } else { echo _('no'); } echo '</td> </tr>' . chr(10); echo '<tr> <td align="right"><b>' . _('Invoice status') . ':</b> </td> <td>'; switch ($entry['invoice_status']) { case '0': echo _('not to be made'); break;
} } echo '<br /><br /></span>'; } echo '<h1>Booking ' . '<a href="entry.php?entry_id=' . $id . '">' . $id . '</a>' . ' har feil med fakturagrunnlaget</h1>'; echo '<div class="error" style="width: 500px;"><ul style="padding-left: 20px; margin: 0px;">'; foreach ($checkInvoice[0] as $error) { echo '<li>' . $error . '</li>'; } echo '</ul></div>'; } } if ($entry_errors) { echo '<h1>Feilmeldingene over må rettes før det kan sendes til regnskap</h1>'; echo '<p style="font-size: 1.4em; margin: 10px;">' . iconHTML('arrow_right') . ' Endre bookingen(e) (trykk på bookingnr over)</p>'; echo '<p style="font-size: 1.4em; margin: 10px;">' . iconHTML('arrow_right') . ' <a href="' . $redirect . '">Gå tilbake til listen over faktureringsklare bookinger</a></p><br />'; echo 'Du kan også sette den klar til fakturering, men det blir kanskje bare å skyve problemene videre på noen andre/utsette de<br />'; echo '- <a href="' . $_SERVER['PHP_SELF'] . '?' . implode('&', $entry_ids_url) . '&ignore_errors=1">Sett til status "sendt til regnskap"</a><br>'; } if (!$entry_errors) { if (!count($entries)) { header('Location: ' . $redirect); exit; } mysql_query("\n\t\tINSERT INTO `invoiced` (\n\t\t\t\t`invoiced_id` ,\n\t\t\t\t`created` ,\n\t\t\t\t`emailed` ,\n\t\t\t\t`emailed_time` ,\n\t\t\t\t`pdf_name`\n\t\t\t)\n\t\t\tVALUES (\n\t\t\t\tNULL , \n\t\t\t\t'" . time() . "', \n\t\t\t\t'0', \n\t\t\t\t'0', \n\t\t\t\t''\n\t\t\t);"); $invoiced_id = mysql_insert_id(); if ($invoiced_id <= 0) { echo '$invoiced_id not correct. File: ' . __FILE__ . ' Line: ' . __LINE__; exit; } $pdf_invoicedata = array();
echo ' <td>' . $user['user_name_short'] . '</td>' . chr(10); echo ' <td>' . iconHTML('lock') . ' ' . $user['user_accesslevel'] . '</td>' . chr(10); echo ' <td>' . '<div class="showButton" id="buttonId' . $user['user_id'] . '"><a href="javascript:void();">Vis / Ikke vis</a></div>' . '<div class="showField" id="fieldId' . $user['user_id'] . '" style="display:none;">' . 'Telefon: ' . $user['user_phone'] . '<br>' . 'E-post: ' . $user['user_email'] . '<br>' . 'Stilling: ' . $user['user_position'] . '<br>'; $area_user = getArea($user['user_area_default']); if (!count($area_user)) { $area_user['area_name'] = 'IKKE FUNNET'; } echo 'Standard bygg: ' . $area_user['area_name'] . '<br>'; echo 'Fakturatilgang: '; if ($user['user_invoice']) { echo 'ja'; } else { echo 'nei'; } '</div></td>' . chr(10); echo ' <td>' . '<a href="' . $_SERVER['PHP_SELF'] . '?editor=1&id=' . $user['user_id'] . '">' . iconHTML('user_edit') . ' ' . 'Endre</a>' . '</td>' . chr(10); echo ' <td>'; if (count($user) && count($user['groups'])) { echo '<ul style="margin: 0;">' . chr(10); foreach ($user['groups'] as $gid) { $group = getGroup($gid); if (count($group)) { echo '<li>' . $group['group_name'] . '</li>' . chr(10); } } echo '</ul>' . chr(10); } echo '</td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); //echo '- <br>'.chr(10); }
} else { $namelink = false; } if ($namelink && ($template[6] == '' || $login[$template[6]])) { echo '<td>' . '<img src="./img/icons/' . $template[4] . '" style="border: 0px solid black; vertical-align: middle;"> ' . '<a href="' . $_SERVER['PHP_SELF'] . '?template_file=' . $template[1] . '">' . $template[0] . '</a>' . '</td>'; } else { echo ' <td>' . '<img src="./img/icons/' . $template[4] . '" style="border: 0px solid black; vertical-align: middle;"> '; if ($template[6] == '' || $login[$template[6]]) { echo '<a href="' . $_SERVER['PHP_SELF'] . '?template_file=' . $template[1] . '&view=1">' . $template[0] . '</a></td>' . chr(10); } else { echo $template[0] . '</td>' . chr(10); } } echo ' <td>'; if (!$namelink && ($template[6] == '' || $login[$template[6]])) { echo '<a href="' . $_SERVER['PHP_SELF'] . '?template_file=' . $template[1] . '">' . iconHTML('layout_edit') . ' ' . __('Edit') . '</a>'; } else { echo ' '; } if ($template[5] && ($template[6] == '' || $login[$template[6]])) { echo ' -:- <a href="' . $_SERVER['PHP_SELF'] . '?template_delete=1&template_file=' . $template[1] . '">' . ' <img src="./img/icons/layout_delete.png" style="border: 0px solid black; vertical-align: middle;"> ' . __('Delete') . '</a>'; } else { echo ' '; } echo '</td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } exit; } // Checking filename if (!array_key_exists($_GET['template_file'], $allowed_templatefiles)) {
echo '<ul>' . chr(10); while ($R = mysql_fetch_assoc($Q_groups)) { echo '<li><a href="' . $_SERVER['PHP_SELF'] . '?gid=' . $R['group_id'] . '">' . $R['group_name'] . '</a></li>'; } echo '</ul>' . chr(10); echo '<b>Alle brukere</b><br />'; echo '<table class="prettytable">' . chr(10); echo ' <tr>' . chr(10); echo ' <th>Navn</th>' . chr(10); echo ' <th>Initialer</th>' . chr(10); echo ' <th>Anlegg</th>' . chr(10); echo ' </tr>' . chr(10) . chr(10); while ($R_user = mysql_fetch_assoc($Q_users)) { $user = getUser($R_user['user_id'], true); echo ' <tr>' . chr(10); echo ' <td>' . '<a href="user.php?user_id=' . $user['user_id'] . '">' . iconHTML('user') . ' ' . $user['user_name'] . '</a>' . '</td>' . chr(10); echo ' <td>' . $user['user_name_short'] . '</td>' . chr(10); echo ' <td>'; $area_user = getArea($user['user_area_default']); if (!count($area_user)) { $area_user['area_name'] = ''; } echo $area_user['area_name']; echo '</td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } echo '</table>' . chr(10); } else { $group = getGroup($_GET['gid']); if (count($group)) { echo '<b>Viser brukergruppen ' . $group['group_name'] . '</b><br />' . chr(10);
function iconFiletype($extention) { $filename = iconFiletypeFilename($extention); $fileending = '.gif'; return iconHTML($filename, $fileending); }
echo ' </tr>' . chr(10) . chr(10); while ($R_program = mysql_fetch_assoc($Q_programs)) { echo ' <tr>' . chr(10); echo ' <td><b>' . $R_program['program_id'] . '</b></td>' . chr(10); echo ' <td>' . iconHTML('package') . ' ' . $R_program['program_name'] . '</td>' . chr(10); echo ' <td>' . nl2br($R_program['program_desc']) . '</td>' . chr(10); echo ' <td>'; $Q_area = mysql_query("select * from `mrbs_area` where id = '" . $R_program['area_id'] . "'"); if (!mysql_num_rows($Q_area)) { echo '<i>' . _('Not found') . '</i>'; } else { echo iconHTML('house') . ' ' . mysql_result($Q_area, 0, 'area_name'); } echo '</td>' . chr(10); // Attachments echo ' <td>'; $Q_att = mysql_query("\n\t\t\tSELECT\n\t\t\t\ta.att_filetype, a.att_filename_orig, a.att_filesize, a.att_id\n\t\t\tFROM `programs_defaultattachment` p LEFT JOIN `entry_confirm_attachment` a \n\t\t\t\tON p.att_id = a.att_id\n\t\t\tWHERE\n\t\t\t\tp.program_id = '" . $R_program['program_id'] . "'\n\t\t\tORDER BY a.att_filename_orig"); while ($att = mysql_fetch_assoc($Q_att)) { echo '<a href="admin_attachment.php?att_id=' . $att['att_id'] . '">' . iconFiletype($att['att_filetype']) . ' ' . $att['att_filename_orig'] . '</a>' . ' (' . smarty_modifier_file_size($att['att_filesize']) . ')<br>'; } echo '</td>' . chr(10); // Options echo ' <td>'; if (authGetUserLevel(getUserID()) >= $user_level) { echo '<a href="' . $_SERVER['PHP_SELF'] . '?editor=1&id=' . $R_program['program_id'] . '">' . iconHTML('package_go') . ' ' . _('Edit') . '</a> -:- '; } echo '<a href="' . $_SERVER['PHP_SELF'] . '?program_id=' . $R_program['program_id'] . '">' . iconHTML('package_link') . ' ' . 'Endre vedlegg</a>'; echo '</td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } }
foreach ($filters as $filter) { if ($filter[0] == 'tamed_booking') { $tamed_booking = $filter[1]; } } if (!$tamed_booking || !mysql_num_rows($Q)) { echo __('No entries found.'); } else { echo mysql_num_rows($Q) . ' ' . __('entries found.'); //echo '<br><br>'.chr(10).chr(10); echo '<table class="prettytable">' . chr(10); echo ' <tr>' . chr(10); if ($listtype == 'customer_list') { echo ' <th style="vertical-align: bottom;">' . iconHTML('group') . ' Kundenavn</th>' . chr(10); echo ' <th style="vertical-align: bottom;">' . iconHTML('user_small') . ' B / ' . iconHTML('user_suit') . ' V</th>' . chr(10); echo ' <th style="vertical-align: bottom;">' . iconHTML('page_white') . ' Antall booking</th>' . chr(10); $customer_list = array(); $customer_names = array(); } else { echo ' <th style="vertical-align: bottom;">' . __('Starts') . '</th>' . chr(10); echo ' <th style="vertical-align: bottom;">' . __('Ends') . '</th>' . chr(10); echo ' <th style="vertical-align: bottom;">' . __('C/A') . '</th>' . chr(10); echo ' <th style="vertical-align: bottom;">' . __('Entry type') . '</th>' . chr(10); echo ' <th style="vertical-align: bottom;">' . __('Name') . '</th>' . chr(10); if ($listtype == 'servering') { echo ' <th style="vertical-align: bottom;">Alkohol?</th>' . chr(10); echo ' <th style="vertical-align: bottom;">' . __('Service description') . '</th>' . chr(10); } echo ' <th style="vertical-align: bottom;">' . __('Room') . '</th>' . chr(10); } echo ' </tr>' . chr(10);
echo ' </tr>' . chr(10) . chr(10); while ($R_product = mysql_fetch_assoc($Q_products)) { echo ' <tr>' . chr(10); echo ' <td>'; if ($R_product['area_id'] == 0) { echo iconHTML('chart_organisation') . ' Alle anlegg'; } else { $Q_area = mysql_query("select * from `mrbs_area` where id = '" . $R_product['area_id'] . "'"); if (!mysql_num_rows($Q_area)) { echo '<i>' . __('Not found') . '</i>'; } else { echo iconHTML('house') . ' ' . mysql_result($Q_area, 0, 'area_name'); } echo '</td>' . chr(10); } echo ' <td><b>' . $R_product['product_id'] . '</b></td>' . chr(10); echo ' <td>' . iconHTML('package') . ' ' . $R_product['product_name'] . '</td>' . chr(10); echo ' <td><b>' . $R_product['product_price'] . '</b></td>' . chr(10); echo ' <td><b>' . $R_product['product_tax'] . ' %</b></td>' . chr(10); echo ' <td>' . nl2br($R_product['product_desc']) . '</td>' . chr(10); // Options echo ' <td>'; if ($login['user_access_productsadmin']) { echo '<a href="' . $_SERVER['PHP_SELF'] . '?editor=1&id=' . $R_product['product_id'] . '">' . iconHTML('package_go') . ' ' . __('Edit') . '</a>'; } else { echo '<i>Ikke tilgang til å endre'; } echo '</td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } }
$color = ' style="background-color: #EFEFFF;"'; $ico = 'email_link'; } echo ' <tr>' . chr(10); echo ' <td class="border"' . $color . '>' . iconHTML($ico) . '<input type="hidden" id="address_full' . $address['address_id'] . '" value="' . $address['address_full'] . '">' . '<input type="radio" onclick="choose_address(\'' . $address['address_id'] . '\');"></td>' . chr(10); echo ' <td class="border"' . $color . '>' . $address['address_info'] . '</td>' . chr(10); echo ' <td class="border"' . $color . '>'; echo nl2br($address['address_full']) . chr(10); echo '</td>' . chr(10); /* echo ' <td class="border"'.$color.'>'; if($customer['customer_address_id_invoice'] == $address['address_id']) echo _('Yes'); else echo _('No'); */ echo '</td>' . chr(10); echo ' <td class="border"' . $color . '>'; echo '<a href="' . $_SERVER['PHP_SELF'] . '?' . $string . '&address_id=' . $address['address_id'] . '">Endre</a>'; echo '</td>' . chr(10); echo ' </tr>' . chr(10); } echo '</table>' . chr(10); echo '<br><br>'; echo '<table><tr><td style="background-color: #EFEFFF;">' . iconHTML('email_link') . ' Adressen er standard fakturaadresse for kunden.</td></tr></table>'; } else { echo __('No addresses.') . '<br>'; } echo '<br>'; echo '<a href="' . $_SERVER['PHP_SELF'] . '?' . $string . '&address_id=0">Ny adresse</a>'; echo '</body></html>';
function entrylist_invoice_tobemade($SQL, $tamed_booking, $area_spesific = false) { $Q = mysql_query($SQL . ' order by `time_start`'); if (!$tamed_booking || !mysql_num_rows($Q)) { echo __('No entries found.'); } else { echo '<font color="red">' . mysql_num_rows($Q) . '</font> ' . __('entries found.'); echo '<br>' . chr(10) . chr(10); echo '<table style="border-collapse: collapse;">' . chr(10); echo ' <tr>' . chr(10); echo ' <td style="border: 1px solid black;"><b>Arrangementsdato</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"><b>' . __('Name') . '</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"><b>' . __('Area') . '</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"><b>Sum</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"><b> </b></td>' . chr(10); echo ' </tr>' . chr(10); while ($R = mysql_fetch_assoc($Q)) { $entry = getEntry($R['entry_id']); echo ' <tr>' . chr(10); // Starts echo ' <td style="border: 1px solid black;">'; echo '<a href="day.php?year=' . date('Y', $entry['time_start']) . '&month=' . date('m', $entry['time_start']) . '&day=' . date('d', $entry['time_start']) . '&area=' . $entry['area_id'] . '">' . date('d', $entry['time_start']) . '</a>-'; echo '<a href="month.php?year=' . date('Y', $entry['time_start']) . '&month=' . date('m', $entry['time_start']) . '&day=' . date('d', $entry['time_start']) . '&area=' . $entry['area_id'] . '">' . __(date('m', $entry['time_start'])) . '</a>-'; echo date('Y', $entry['time_start']); echo '</td>' . chr(10); // Name echo ' <td style="border: 1px solid black;"><a href="entry.php?entry_id=' . $entry['entry_id'] . '">' . $entry['entry_name'] . '</a>'; $checkInvoice = checkInvoicedata($entry); if (count($checkInvoice[0])) { echo '<br /><br /><b>Feil med fakturagrunnlag:</b><br />'; echo '<div class="error"><ul style="padding-left: 20px; margin: 0px;">'; foreach ($checkInvoice[0] as $error) { echo '<li>' . $error . '</li>'; } echo '</ul></div>'; } if (count($checkInvoice[1])) { if (!count($checkInvoice[0])) { echo '<br /><br />'; } echo '<b>Advarsler på fakturagrunnlag:</b><br />'; echo '<div class="notice"><ul style="padding-left: 20px; margin: 0px;">'; foreach ($checkInvoice[1] as $warnings) { echo '<li>' . $warnings . '</li>'; } echo '</ul></div>'; } echo '</td>' . chr(10); // Area echo ' <td style="border: 1px solid black;">'; $area = getArea($entry['area_id']); if (count($area)) { echo $area['area_name']; } echo '</td>' . chr(10); // Invoice echo ' <td style="border: 1px solid black; text-align: right;">kr ' . smarty_modifier_commify($entry['faktura_belop_sum'], 2, ",", " ") . '</td>' . chr(10); // Set ready echo ' <td style="border: 1px solid black;">'; echo '<a href="invoice_setready.php?entry_id=' . $entry['entry_id']; if ($area_spesific) { echo '&return=invoice_tobemade_area'; } else { echo '&return=invoice_tobemade'; } echo '">' . 'Sett faktureringsklar '; if (count($checkInvoice[0])) { // Errors echo iconHTML('arrow_right_red'); } elseif (count($checkInvoice[1])) { // Warnings echo iconHTML('arrow_right_yellow'); } else { // None echo iconHTML('arrow_right'); } echo '</a>'; echo '</td>' . chr(10); echo ' </tr>' . chr(10); } echo '</table>'; } }
while ($R_invoiced = mysql_fetch_assoc($Q_invoiced)) { // Emails $sendto = ''; if ($R_invoiced['emailed'] == '1') { $Q_emails = mysql_query("select * from `invoiced_emails` where `invoiced_id` = '" . $R_invoiced['invoiced_id'] . "'"); $sendto = array(); while ($R_emails = mysql_fetch_assoc($Q_emails)) { $sendto[] = $R_emails['email_addr']; } $sendto = implode($sendto, ',<br />'); } // Entries $Q_entries = mysql_query("\n\t\t\tSELECT entry . *\n\t\t\t\tFROM \n\t\t\t\t\t`entry_invoiced`\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t`entry`\n\t\t\t\tON\n\t\t\t\t\t`entry_invoiced`.entry_id = `entry`.entry_id\n\t\t\t\tWHERE\n\t\t\t\t\t`entry_invoiced`.invoiced_id = '" . $R_invoiced['invoiced_id'] . "';\n\t\t\t"); $entries = array(); while ($R_entry = mysql_fetch_assoc($Q_entries)) { $entries[] = '<a href="entry.php?entry_id=' . $R_entry['entry_id'] . '">' . iconHTML('page_white_star') . ' (' . $R_entry['entry_id'] . ') ' . $R_entry['entry_title'] . '</a>'; } $entries = implode($entries, ',<br />'); $pdf_link = ''; if ($R_invoiced['pdf_name'] != '') { $pdf_link = '<a href="' . $invoice_location . $R_invoiced['pdf_name'] . '">' . iconFiletype('pdf') . ' ' . $R_invoiced['pdf_name'] . '</a>'; } // Highlight $highlighted = ''; if (isset($_GET['highlight']) && $_GET['highlight'] == $R_invoiced['invoiced_id']) { $highlighted = ' class="notice"'; } echo '<tr' . $highlighted . '>' . '<td>' . date('d-m-Y H:i:s', $R_invoiced['created']) . '</td>' . '<td>' . $entries . '</td>' . '<td>' . $pdf_link . '</td>' . '<td>' . $sendto . '</td>' . '</tr>' . chr(10); } echo '</table>'; }
<td align="right">kr 800,00</td> <td align="right">kr 200,00</td> </tr> <tr> <td align="right">SUM MVA</td> <td align="right">kr 800,00</td> <td align="right">kr 200,00</td> </tr> </table> '; echo '<br><br>'.chr(10).chr(10);*/ // Datoer echo '<table>' . chr(10); echo '<tr class="invoiceinfo"><td class="invoiceinfo">' . iconHTML('date') . ' Fakturadato </td>' . '<td class="invoiceinfo"><input size="40" type="text" name="invoice_time" value="' . substr($invoice->invoice_time, 0, 4) . '-' . substr($invoice->invoice_time, 4, 2) . '-' . substr($invoice->invoice_time, 6) . '"></td>' . '</tr>' . chr(10); echo '<tr class="invoiceinfo"><td class="invoiceinfo">' . iconHTML('date_delete') . ' Forfallsdato </td>' . '<td class="invoiceinfo"><input size="40" type="text" name="invoice_time_due" id="invoice_time_due" value="' . substr($invoice->invoice_time_due, 0, 4) . '-' . substr($invoice->invoice_time_due, 4, 2) . '-' . substr($invoice->invoice_time_due, 6) . '"></td>' . '<td>'; $time = mktime(0, 0, 0, $invoice->invoice_time2['month'], $invoice->invoice_time2['day'], $invoice->invoice_time2['year']); echo ' <input type="button" onclick="document.getElementById(\'invoice_time_due\').value=\'' . date('Y-m-d', $time + 1 * 7 * 24 * 60 * 60) . '\'; return false;" value="1 uke"> <input type="button" onclick="document.getElementById(\'invoice_time_due\').value=\'' . date('Y-m-d', $time + 2 * 7 * 24 * 60 * 60) . '\'; return false;" value="2 uke"> <input type="button" onclick="document.getElementById(\'invoice_time_due\').value=\'' . date('Y-m-d', $time + 3 * 7 * 24 * 60 * 60) . '\'; return false;" value="3 uke"> <input type="button" onclick="document.getElementById(\'invoice_time_due\').value=\'' . date('Y-m-d', $time + 4 * 7 * 24 * 60 * 60) . '\'; return false;" value="4 uke"> </td></tr>' . chr(10); echo '</table><br>' . chr(10); if (count($invoice->invoice_idlinks)) { echo 'Denne fakturaen er lenket med:<br>'; foreach ($invoice->invoice_idlinks as $link) { list($idtype, $id) = explode('=', $link); echo '<input type="hidden" name="invoice_idlinks[]" value="' . $link . '">'; echo '<input type="checkbox" checked="checked" disabled="disabled"> - ';
$warning_tmp = '<b>Hele bygningen</b> er booket for: '; } else { $thisroom = getRoom($rid); if (!count($thisroom)) { $warning_tmp = __('One of the rooms you have selected is already booked for') . ': '; } else { $warning_tmp = '<b>' . $thisroom['room_name'] . '</b>' . __(' is already booked at the time you have selected for') . ': '; } } $i = 0; $warning_tmp .= '<ul>'; foreach ($entries as $entryid) { $i++; $entrytmp = getEntry($entryid); if (count($entrytmp)) { $warning_tmp .= '<li>' . iconHTML('page_white') . ' <i>' . $entrytmp['entry_name'] . '</i> (' . '<a href="entry.php?entry_id=' . $entrytmp['entry_id'] . '">Vis booking</a>)' . '</li>'; //if($i != count($entries)) // $warning_tmp .= ' '._('and for').' '; } } $warning_tmp .= '</ul>'; $warnings[] = $warning_tmp; } } } // Checking user, if some conditions are met if ($entry_add || $entry['time_start'] != $time_start || $entry['time_end'] != $time_end || splittalize($entry['user_assigned']) != splittalize($user_assigned)) { $checkuser = checkTime_User($time_start, $time_end, $user_assigned); // $array[userid][entryid] = entryid; if (count($checkuser)) { // Removing this event if we are editing
echo __('Error: No user spesified.'); exit; } $user = getUser($user_id); if (!count($user)) { echo __('Can\'t find user'); exit; } print_header($day, $month, $year, $area); echo '<h1>' . __('Viewing user details') . '</h1>' . chr(10) . chr(10); if ($user['deactivated']) { echo '<div class="error" style="width: 500px;">' . __('This user is deactivated.') . '</div>'; } if ($login['user_access_useredit'] || $login['user_id'] == $user['user_id']) { echo '<a href="admin_user2.php?editor=1&id=' . $user['user_id'] . '">' . iconHTML('user_edit') . ' Endre bruker</a><br />' . chr(10) . chr(10); echo '<a href="admin_user_password.php?id=' . $user['user_id'] . '">' . iconHTML('lock_edit') . ' Endre passord</a><br /><br />' . chr(10) . chr(10); } echo '<b>' . __('UserID') . ':</b> ' . $user['user_id'] . '<br>' . chr(10); echo '<b>' . __('Username') . ':</b> ' . $user['user_name'] . '<br>' . chr(10); echo '<b>' . __('Short username') . ':</b> ' . $user['user_name_short'] . '<br>' . chr(10); echo '<b>' . __('E-mail') . ':</b> ' . $user['user_email'] . '<br>' . chr(10); echo '<b>' . __('Phone') . ':</b> ' . $user['user_phone'] . '<br>' . chr(10); echo '<b>Stilling:</b> ' . $user['user_position'] . '<br>' . chr(10); echo '<!-- '; echo '<br><b>Adresse for internettkalender i Outlook:</b><br><input type="text" size="70" value="' . $systemurl . '/entry_ical.php?user_id=' . $user['user_id'] . '"><br>' . 'Se <a href="' . wikiLink('Bookingsystemet/Bookinger_i_Outlook') . '">guide på wiki</a> for informasjon om hvordan du legger inn kalenderen' . chr(10); echo '-->'; echo '<h2>' . __('Upcoming entries for ') . ' ' . $user['user_name'] . '</h2>' . chr(10); filterMakeAlternatives(); $filters = array(); $filters = addFilter($filters, 'user_assigned', $user['user_id']); $filters = addFilter($filters, 'time_start', 'current', '>');
$classes = ' ' . implode($field['class']); } // Vertical alignment if ($field['type'] != 'radio' && $field['type'] != 'checkbox') { $valign = ' valign'; } else { $valign = ''; } if ($field['type'] == 'hidden') { $hidden_after .= chr(10) . '<input type="hidden" name="' . $field['var'] . '" value="' . $field['value'] . '"' . $elementid . '>' . $after; } else { echo '<tr>' . chr(10); echo ' <td align="right" class="edit_entry' . $valign . '">'; if ($field['var'] != 'empty' && $field['type'] != 'hidden' && $field['type'] != 'submit') { if (isset($icon[$field['var']])) { echo iconHTML($icon[$field['var']], '') . ' '; } echo '<b>' . $field['name'] . '</b>'; } else { echo ' '; } echo '</td>' . chr(10); if ($field['type'] == 'invoice_content') { } elseif (isset($field['desc']) && $field['desc'] != '') { echo ' <td class="edit_entry' . $valign . '">' . '<a class="programHover infoicon" title="' . nl2br($field['desc']) . '"> ' . '</a>' . '</td>' . chr(10); } else { echo ' <td class="edit_entry" style="width: 15px; text-align: center;"> </td>' . chr(10); } if ($field['type'] == 'invoice_content' || isset($field['colspanDesc']) && $field['colspanDesc']) { echo ' <td class="edit_entry_fields" colspan="2">'; } else {
echo ' <td>'; echo '<div class="showButton" id="buttonId' . $ROW['entry_type_id'] . '">'; //<a href="javascript:switchView('.$ROW['entry_type_id'].');">vis</a>'; echo '<a href="javascript:void();">Vis / ikke vis</a>' . '</div>'; echo '<div class="showField" id="fieldId' . $ROW['entry_type_id'] . '" style="display:none;">'; $Q_area = mysql_query("select id as area_id, area_name from `mrbs_area` order by area_name"); while ($area = mysql_fetch_assoc($Q_area)) { echo '<ul style="padding-left: 20px; "><li>'; echo '<b>' . $area['area_name'] . '</b>'; echo ' (<a href="' . $_SERVER['PHP_SELF'] . '?entry_type_id=' . $ROW['entry_type_id'] . '&area_id=' . $area['area_id'] . '">' . iconHTML('page_white_stack_link', '.png', 'height: 12px;') . ' ' . 'Endre</a>)'; echo '<br><ul style="padding-left: 10px; ">'; $Q_att = mysql_query("\n\t\t\tSELECT\n\t\t\t\ta.att_filetype, a.att_filename_orig, a.att_filesize, a.att_id, e.area_id\n\t\t\tFROM `entry_type_defaultattachment` e LEFT JOIN `entry_confirm_attachment` a \n\t\t\t\tON e.att_id = a.att_id\n\t\t\tWHERE\n\t\t\t\te.entry_type_id = '" . $ROW['entry_type_id'] . "' AND\n\t\t\t\te.area_id = '" . $area['area_id'] . "'\n\t\t\tORDER BY a.att_filename_orig"); if (!mysql_num_rows($Q_att)) { echo '<li><i>Ingen vedlegg koblet til</i></li>'; } else { while ($att = mysql_fetch_assoc($Q_att)) { echo '<li><a href="admin_attachment.php?att_id=' . $att['att_id'] . '">' . iconFiletype($att['att_filetype']) . ' ' . $att['att_filename_orig'] . '</a>' . ' (' . smarty_modifier_file_size($att['att_filesize']) . ')</li>'; } } echo '</ul></li></ul>'; } echo '</div>'; echo '</td>'; echo ' <td>'; if ($login['user_access_entrytypeadmin']) { echo '<a href="' . $_SERVER['PHP_SELF'] . '?editor=1&id=' . $ROW['entry_type_id'] . '">' . iconHTML('page_white_edit') . ' ' . __('Edit') . ' -:- '; } echo '</td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } }
exit; } } // Please confirm if (!isset($_GET['confirmed']) || $_GET['confirmed'] != 1) { print_header($day, $month, $year, $area); echo '<h1>Er du sikker du vil '; if ($action_delete) { $additions = ''; echo 'slette bookingen'; } else { $additions = '&undelete=1'; echo 'gjenopprette bookingen'; } echo '?</h1>'; echo '<p style="font-size: 1.4em; margin: 10px;">' . '<a href="entry_delete.php?entry_id=' . $entry['entry_id'] . $additions . '&confirmed=1&alert=1">' . iconHTML('tick') . ' Ja, og varsle de som satt opp som verter' . '</a>' . '</p>' . '<p style="font-size: 1.4em; margin: 10px;">' . '<a href="entry_delete.php?entry_id=' . $entry['entry_id'] . $additions . '&confirmed=1">' . iconHTML('tick') . ' Ja, men ikke varsle de som satt opp som verter' . '</a>' . '</p>' . '<p style="font-size: 1.4em; margin: 10px;">' . '<a href="entry.php?entry_id=' . $entry['entry_id'] . '">' . iconHTML('cross') . ' Nei' . '</a>' . '</p>'; exit; } // Copying data if ($action_delete) { // Delete $from_table = 'entry'; $to_table = 'entry_deleted'; $log_action2 = 'entry_deleted'; } else { // Undelete $from_table = 'entry_deleted'; $to_table = 'entry'; $log_action2 = 'entry_undeleted'; } mysql_query('insert into ' . $to_table . ' (select * from ' . $from_table . ' where `entry_id` = \'' . $entry['entry_id'] . '\' limit 1)');
{ if (top.opener && !top.opener.closed) { top.opener.selectCustomer(id); top.close(); } } </script>'; echo '<table>'; while ($R = mysql_fetch_assoc($Q_customer)) { $customer = getCustomer($R['customer_id']); $filter = addFilter(array(), 'customer_id', $customer['customer_id']); $filters_serialized = filterSerialized($filter); echo ' <tr>' . chr(10); echo ' <td><b>' . '<input type="button" onclick="chooseCustomer(\'' . $customer['customer_id'] . '\'); return false;" value="' . _('Choose this customer') . '"> ' . 'Kundenr ' . $customer['customer_id'] . ', ' . '<a href="customer.php?customer_id=' . $customer['customer_id'] . '">' . iconHTML('group') . ' ' . $customer['customer_name'] . '</a></b></td>' . chr(10); echo ' <td style="vertical-align: middle;">' . ' (<a href="entry_list.php?filters=' . $filters_serialized . '">' . mysql_num_rows(mysql_query(genSQLFromFilters($filter, 'entry_id'))) . ' bookinger</a>)' . '</td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } echo '</table>'; echo '<br><br>'; echo '<form method="get">'; echo '<input type="hidden" name="customer_name" value="' . $data['customer_name'] . '">'; echo '<input type="hidden" name="customer_add_force" value="yes">'; echo '<input type="submit" value="Nei, jeg vil opprette ny">'; echo '</form>'; echo '</body></html>'; exit; } } }
function invoicelist_payed($Q) { //$Q = mysql_query($SQL); if (!mysql_num_rows($Q)) { echo '<i>Ingen fakturaer er registert som betalt.</i>'; } else { echo '<font color="red">' . mysql_num_rows($Q) . '</font> fakturaer funnet'; echo '<br>' . chr(10) . chr(10); echo '<table style="border-collapse: collapse;">' . chr(10); echo ' <tr>' . chr(10); echo ' <td style="border: 1px solid black;"><b class="hiddenprint">Vis mer</b><b class="print">Fakturaid</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"><b>Fakturadato</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"><b>Betalt</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"><b>Beløp</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"><b>Kunde</b></td>' . chr(10); echo ' <td style="border: 1px solid black;"> </td>' . chr(10); echo ' </tr>' . chr(10); while ($R = mysql_fetch_assoc($Q)) { $invoice = new invoice($R['invoice_id']); $invoice->get(); echo ' <tr>' . chr(10); // invoice_id echo ' <td style="border: 1px solid black;">'; echo '<a href="invoice_view.php?invoice_id=' . $invoice->invoice_id . '" class="hiddenprint">' . iconHTML('coins') . ' Faktura ' . $invoice->invoice_id . '</a>'; echo '<b class="print">' . $invoice->invoice_id . '</b>'; echo '</td>' . chr(10); // time echo ' <td style="border: 1px solid black;">'; echo $invoice->invoice_time2['year'] . '-' . $invoice->invoice_time2['month'] . '-' . $invoice->invoice_time2['day']; echo '</td>' . chr(10); // time_payed echo ' <td style="border: 1px solid black;">'; echo nl2br($invoice->invoice_payment_time); echo '</td>' . chr(10); // sum echo ' <td style="border: 1px solid black;">kr ' . smarty_modifier_commify($invoice->invoice_payed_amount, 2, ",", " ") . '</td>' . chr(10); // Customer echo ' <td style="border: 1px solid black;">'; if ($invoice->invoice_to_customer_name != '') { echo '<a href="customer.php?customer_id=' . $invoice->invoice_to_customer_id . '">' . $invoice->invoice_to_customer_name . '</a>'; } else { echo $invoice->invoice_to_line1; } echo '</td>' . chr(10); // Options echo ' <td style="border: 1px solid black;">'; echo nl2br($invoice->invoice_payment_comment); echo '</td>' . chr(10); echo ' </tr>' . chr(10); } echo '</table>'; } }
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ require "glob_inc.inc.php"; filterMakeAlternatives(); print_header($day, $month, $year, $area); $Q = mysql_query("SELECT customer_id FROM `customer` WHERE `slettet` = '0' ORDER BY customer_name"); echo '<h1>' . __('Customers') . '</h1>' . chr(10); echo '- ' . iconHTML('group_add') . ' <a href="customer_edit.php?returnToCustomerView=1">' . __('Create new customer') . '</a><br><br>' . chr(10); echo '<table>' . chr(10); //echo ' <tr>'.chr(10); //echo ' <td><b>'._('Customer').'</b></td>'.chr(10); //echo ' <td> </td>'.chr(10); //echo ' </tr>'.chr(10).chr(10); while ($R = mysql_fetch_assoc($Q)) { $customer = getCustomer($R['customer_id']); if (count($customer)) { $filter = addFilter(array(), 'customer_id', $customer['customer_id']); $filters_serialized = filterSerialized($filter); echo ' <tr>' . chr(10); echo ' <td><b>' . $customer['customer_id'] . ' </b></td>' . chr(10); echo ' <td><b>' . '<a href="customer.php?customer_id=' . $customer['customer_id'] . '">' . iconHTML('group') . ' ' . $customer['customer_name'] . '</a></b></td>' . chr(10); echo ' <td><font size="1">' . '<a href="customer_edit.php?customer_id=' . $customer['customer_id'] . '&returnToCustomerList=1">' . iconHTML('group_edit') . ' ' . __('Edit') . '</a>' . ' -:- <a href="entry_list.php?filters=' . $filters_serialized . '">' . iconHTML('page_white') . ' ' . __('View entries') . '</a>' . '</font></td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } } echo '</table>' . chr(10);
include "include/admin_middel.php"; $editor->printEditor(); echo '<br /><br />*' . __('Email(s) receiving alerts when new goods are detected for this shop.') . '<br />' . __('Can be multiple emails seperated by space, comma or semicolon.'); } else { // List include "include/admin_middel.php"; echo '<h2>' . __('Area') . '</h2>' . chr(10) . chr(10); $QUERY = mysql_query("select * from `mrbs_area` order by area_name"); if ($login['user_access_areaadmin']) { echo '<a href="' . $_SERVER['PHP_SELF'] . '?editor=1">' . iconHTML('house_add') . ' ' . __('New area') . '</a><br><br>' . chr(10); } echo '<table class="prettytable">' . chr(10) . chr(10); echo ' <tr>' . chr(10); echo ' <th><b>' . __('ID') . '</b></th>' . chr(10); echo ' <th><b>' . __('Area') . '</b></th>' . chr(10); if ($login['user_access_areaadmin']) { echo ' <th><b>' . __('Options') . '</b></th>' . chr(10); } echo ' </tr>' . chr(10) . chr(10); while ($ROW = mysql_fetch_assoc($QUERY)) { echo ' <tr>' . chr(10); echo ' <td><b>' . $ROW['id'] . '</b></td>' . chr(10); echo ' <td>' . iconHTML('house') . ' ' . $ROW['area_name'] . '</td>' . chr(10); echo ' <td>' . '<a href="admin_room.php?area_id=' . $ROW['id'] . '">' . iconHTML('shape_square') . ' ' . __('Show rooms') . '</a>'; if ($login['user_access_areaadmin']) { echo ' -:- ' . '<a href="' . $_SERVER['PHP_SELF'] . '?editor=1&id=' . $ROW['id'] . '">' . iconHTML('house_go') . ' ' . __('Edit'); } echo '</td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } }
addField('area_id', 'select', __('Area')); addID('area_id', 'selected_area_id'); addField('room_id', 'checkbox', __('Room')); addField('empty', '', ''); addField('user_assigned', 'checkbox', __('Users assigned'), 'Brukere som skal være vert på arrangementet ' . 'eller skal være tilknyttet på en eller annen måte.'); addField('user_assigned2', 'text', __('Manuel user assigned'), __('If someone other than the normal users are assigned. Use this field to add his or her name.')); addField('empty', '', ''); addField('customer_name', 'text', __('Customer'), __('Type in parts for the customers name to search.')); addID('customer_name', 'customer_name'); addAfterField('customer_name', ' ' . '<input size="1" type="text" name="customer_id2" disabled="disabled" id="customer_id2">' . ' <button type="button" onclick="new_customer(); return false;" id="customer_edit_button">' . iconHTML('group') . '</button>'); addField('customer_id', 'hidden', ''); addID('customer_id', 'customer_id'); addField('customer_municipal', 'text', __('Municipal'), __('The municipal which the customer belong to.')); addID('customer_municipal', 'customer_municipal'); disableField('customer_municipal'); addAfterField('customer_municipal', ' ' . '<input size="1" type="text" name="customer_municipal_num2" disabled="disabled" id="customer_municipal_num2">' . ' <button type="button" onclick="new_customer(); return false;" id="customer_municial_button">' . iconHTML('map_edit') . '</button>'); addField('customer_municipal_num', 'hidden', ''); addID('customer_municipal_num', 'customer_municipal_num'); addField('contact_person_name', 'text', __('Contact person'), __('The contact person of the customer.')); addID('contact_person_name', 'contact_person_name'); addField('contact_person_phone', 'text', __('Contact telephone'), __('Telephone number where the contact person can be reached. Preferably a mobile number.')); addField('contact_person_email', 'text', __('Contact email'), __('The contact persons email address. For more than one, please seperate by a space, comma or semicolon.')); addBeforeField('contact_person_email', '<table style="border-collapse:collapse;"><tr><td style="padding: 0px;">'); addAfterField('contact_person_email', '</td></tr></table>'); addField('empty', '', ''); addField('num_person_child', 'text', __('Number of children')); addField('num_person_adult', 'text', __('Number of adults')); addField('num_person_count', 'radio', __('Count these numbers'), __('If yes the number of children and adults will be counted from the booking system and not the counter.')); addField('empty', '', ''); addField('service_description', 'textarea', __('Service description'), __('Description of the services we should provide. Food can be one.')); addField('service_alco', 'radio', __('Serve alcohol?'), __('Will there be served alcohol?'));
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ require "glob_inc.inc.php"; filterMakeAlternatives(); print_header($day, $month, $year, $area); $Q = mysql_query("SELECT customer_id FROM `customer` WHERE `slettet` = '0' ORDER BY customer_name"); echo '<h1>' . _('Customers') . '</h1>' . chr(10); echo '- ' . iconHTML('group_add') . ' <a href="customer_edit.php?returnToCustomerView=1">' . _('Create new customer') . '</a><br><br>' . chr(10); echo '<table>' . chr(10); //echo ' <tr>'.chr(10); //echo ' <td><b>'._('Customer').'</b></td>'.chr(10); //echo ' <td> </td>'.chr(10); //echo ' </tr>'.chr(10).chr(10); while ($R = mysql_fetch_assoc($Q)) { $customer = getCustomer($R['customer_id']); if (count($customer)) { $filter = addFilter(array(), 'customer_id', $customer['customer_id']); $filters_serialized = filterSerialized($filter); echo ' <tr>' . chr(10); echo ' <td><b>' . '<a href="customer.php?customer_id=' . $customer['customer_id'] . '">' . iconHTML('group') . ' ' . $customer['customer_name'] . '</a></b></td>' . chr(10); echo ' <td><font size="1">' . '<a href="customer_edit.php?customer_id=' . $customer['customer_id'] . '&returnToCustomerList=1">' . iconHTML('group_edit') . ' ' . _('Edit') . '</a>' . ' -:- <a href="entry_list.php?filters=' . $filters_serialized . '">' . iconHTML('page_white') . ' ' . _('View entries') . '</a> (' . mysql_num_rows(mysql_query(genSQLFromFilters($filter, 'entry_id'))) . ')' . '</font></td>' . chr(10); echo ' </tr>' . chr(10) . chr(10); } } echo '</table>' . chr(10);