Jump to content

Frank Schneider

Members
  • Posts

    35
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Frank Schneider's Achievements

Jr. Member

Jr. Member (3/6)

1

Reputation

  1. I'm currently struggling to find a PHP code to check room occupancy in a template. Based on a date range, I need to check if a room is already booked. Does anyone have a working code? folgendes reicht nicht: $selector.=",datum<=".$id->datum.",datumbis>=".$id->datumbis; Already booked: z.B. 13.08.2025 - 04.12.2025 Checks: 12.08.2025 - 01.10.2025 no problem problem: 01.07.2025 - 03.12.2025 problem: 01.10.2025 - 01.01.2026
  2. <?php if ($page->path == "/avisierungen/kalender/" || $page->path == "/vermietungen/kalender/") { ?> <script> $(function(){ 'use strict' $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay,listMonth' }, height: 'auto', contentHeight: 'auto', aspectRatio: 2.0, weekNumbers: true, navLinks: true, eventTextColor: 'black', defaultDate: '<?php echo date("Y-m-d"); ?>', editable: false, eventLimit: true, // allow "more" link when too many events events: <?php echo json_encode($calendar_data); ?> }); }); <?php } ?>
  3. I'm using the `$('#calendar').fullCalendar` function. One calendar for notifications and another for rentals. The notifications calendar looks as expected, but the rentals calendar doesn't; it only displays 30% horizontally. It needs to be stretched horizontally. The code is exactly the same, only the path is different. I have absolutely no idea why. Does anyone have any advice?
  4. Siehe Anhang wegen Zähler
  5. Danke das hat funktioniert, der Zähler der Authlogs ändert sich nicht ist das Normal?
  6. Meine Seite ist Authlogs (127000 Einträge) mit dem template authlogs. Darin werden Daten gespeichert Authlog mit dem template authlog. Mein Problem ist, dass meine Rest API langsam reagiert, und ich vermute dass die Datensätze zu groß sind. Jetzt will ich alte Datensätze löschen, bei Processwire kann ich das aber nicht so einfach. Ich müsste jeden anklicken, das dauert mir zu lange. Also muss es ein weg geben diese Blockweise oder per Befehl oder tool z löschen. Gruß Frank
  7. I have a table (Authlogs) where the check ins are stored. There are now 130,000 data records there. Wiw can I delete the old ones by date older than 2020? without manually clicking on each record!
  8. from one day to the next (overnight) changes to the PHP file are no longer accepted in the browser. No matter what I change, I update with F5, the view remains the same. None of my changes work. Not until I delete the FileCompiler folder in the catch. But then again the same. Anyone have any advice?
  9. i update my PHP from 7.4 to 8.0 and now i get an error while printing pdf with mPdf -> mPDF error: No font or default font set! i try set define('_MPDF_TTFONTPATH', __DIR__ . '/ttfonts'); in config_fonts.php but nothing change. Did anyone know how to fix this error?
  10. i add this and no changes, $_FILES is empty
  11. I have a Processwire application. In it I have two areas company and their employees. I insert an image in Employees and upload it, it works fine so far, now I do the same in the company and want to use it as a logo, it doesn't work there. When I click save, the $_files field is empty, but not for the employee. So exactly the same as with the employee does not work, same fields, same code. The field is defined in fields as Image and assigned to the template I've searched the whole internet but can't find the reason. my code: $form_fields = array( ..... 'foto' => array('type' => 'file', 'required' => true), ); // --- WireUpload settings --- $upload_path = $config->paths->assets . "files/.tmp_uploads/"; // tmp upload folder $file_extensions = array('jpg', 'jpeg', 'gif', 'png'); $max_files = 1; $max_upload_size = 1*1024*1024; // make sure PHP's upload and post max size is also set to a reasonable size $overwrite = false; $update_page = ($page->url == $pages->get("/firmenverwaltung/edit/")->url) ? $pages->get("id=".(int)$input->urlSegment0) : null; $file_field = "foto"; //HTML <div class="col-lg-6"> <div class="form-group"> <label class="form-control-label">Logo: <?php if ($form_fields['foto']['required']) { ?><span class="tx-danger">*</span><?php } ?></label> <div class="<?php if ($errors["foto"]) { echo "parsley-error"; } ?> custom-file"> <input id="foto" type="file" name="foto[]"> </div> <?php showError($errors, "foto"); ?> </div> <?php if ($firma) { $foto = null; foreach ($firma->foto as $image) { $foto = $image->width(250); break; } if ($foto != null) { echo "<img src='".$foto->url."' />"; } } ?> </div> //Save if($input->post->action == 'send') { // first validate the CSRF token to check if it is a valid request if(!$session->CSRF->hasValidToken()){$errors['csrf'] = "Form submit was not valid, please try again."; } //Look for required fields and make sure they have a value foreach($required_fields as $req) { //print_r($_FILES); //die; // required file upload field if($form_fields[$req]['type'] == 'file'){if(empty($_FILES[$req]['name'][0])){$errors[$req] = "Wählen Sie Dateien zum Hochladen aus.."; } } else if($form_fields[$req]['type'] == 'checkbox'){if($form_fields[$req]['value'] == 0){$errors[$req] = "field necessary.";} // erforderliche Textfelder } else if($form_fields[$req]['type'] == 'text' || $form_fields[$req]['type'] == 'textarea' || $form_fields[$req]['type'] == 'email') { if(!strlen($form_fields[$req]['value'])){$errors[$req] = "Feld notwendig."; } // reqired email fields if($form_fields[$req]['type'] == 'email') { if($form_fields[$req]['value'] != $input->post->$req){$errors[$req] = "Bitte eine gültige E-Mail Adresse angeben.";} } } }
  12. Thanks in advance for the help. But I'm looking for an editor where you don't have to edit the HTML code. I'm looking for an editor like a CMS.
×
×
  • Create New...