Jump to content

eramge11

Members
  • Posts

    21
  • Joined

  • Last visited

eramge11's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When you type them in to the database they save just fine however, if you don't enter a phone number into the database then it will automatically put a "0" in the database. They are saved into an SQL area.
  2. Hello everyone! I have a code that is for a phone number entry. The code works fine however, it will automatically fill "0" in the spot for the phone number if it is null. This is throwing our system off for numbers. If you can see what may be causing this, I would appreciate it. <div class="row"> <div class="row-left"> <?php echo $form->labelEx($info,'student_mobile_no'); ?> <?php echo $form->textField($info,'student_mobile_no',array('size'=>12,'maxlength'=>12)); ?><span class="status"> </span><br/><br/><b style="color:red;"> <?php echo $form->error($info,'student_mobile_no'); ?></b> </div>
  3. The wrapping of the text works, however, it is cutting off the first line of each new page.
  4. I have a problem with text. I have a report system that when you click on "print"- it will generate a PDF report that our employees can print the report. My problem is that if the report is too long it will shift the text to an entirely seperate page. It also looks like the text is in it's own box and the longer the report, the shortly the text will shrink to try and fit it all inside this box. Here is the code: <h4 class="title">REPORT NARRATIVE</h4> <table> <tr> <td><?php echo nl2br($StudentInfo->report_pdf);?></td> </tr> </table>
  5. Here is the code: <style> table{ display: table; border-collapse: collapse; border:1.5px solid #74b9f0; font-size: 12.5px; width:100%; } .no_border tr,td{ border:none; border:hidden; /* background:none; */ border:1.5px solid white; } table tr:nth-child(even) { /*(even) or (2n 0)*/ background: #f1f6ff; } table tr:nth-child(odd) { /*(odd) or (2n 1)*/ background: white; } th{text-align:left;font-weight:normal;color:#990a10;width:110px;border:0.4px solid #74b9f0;height:24px;} .title{color:black;} td{border:0.4px solid #74b9f0;height:24px;} .label{text-align:left;font-weight:normal;color:#990a10;width:110px;height:24px;} </style> <?php $StudentInfo = StudentInfo::model()->findByPk($student_transaction[0]->student_transaction_student_id); $AcademicTermPeriod = AcademicTermPeriod::model()->findByPk($student_transaction[0]->academic_term_period_id); $AcademicTerm = AcademicTerm::model()->findByPk($student_transaction[0]->academic_term_id); if($student_transaction[0]->student_transaction_nationality_id != null) $Nationality = Nationality::model()->findByPk($student_transaction[0]->student_transaction_nationality_id); else $Nationality = new Nationality; $Batch = Batch::model()->findByPk($student_transaction[0]->student_transaction_batch_id); $Course = Course::model()->findByPk($student_transaction[0]->course_id); if($student_transaction[0]->student_transaction_languages_known_id != null) $LanguagesKnown = LanguagesKnown::model()->findByPk($student_transaction[0]->student_transaction_languages_known_id); if($student_transaction[0]->student_transaction_student_address_id != null) $StudentAddress = StudentAddress::model()->findByPk($student_transaction[0]->student_transaction_student_address_id); else $StudentAddress = new StudentAddress; if($student_transaction[0]->student_transaction_parent_id != null || $student_transaction[0]->student_transaction_parent_id != 0) $parent = ParentLogin::model()->findByPk($student_transaction[0]->student_transaction_parent_id); else $parent = new ParentLogin; ?> <h3 class="title">CALL RECORDS SUMMARY</h3> <table class="no_border"> </table> <h4 class="title">ADMINISTRATIVE</h4> <table> <tr> <td class="label">DATE</label></td><td><?php echo $StudentInfo->student_adm_date;?></td> <td class="label">DISPATCH TIME</label></td><td><?php echo $StudentInfo->student_guardian_qualification;?></td> </tr> <tr> <td class="label">ARRIVAL TIME</label></td><td><?php echo $StudentInfo->student_guardian_relation;?></td> <td class="label">CLEARANCE</label></td><td><?php echo $StudentInfo->student_guardian_occupation;?></td> </tr> <tr> </tr> </table> <h4 class="title">INCIDENT</h4> <table> <tr> <td class="label">TYPE OF INCIDENT</td><td><?php if($Nationality) echo $Nationality->nationality_name; else echo ""; ?> <td class="label">REPORT NUMBER</label></td><td><?php echo $StudentInfo->student_guardian_name;?></td> </tr> <tr> <td class="label">PRIMARY OFFICER</label></td><td><?php echo $StudentInfo->student_guardian_home_address;?></td> <td class="label">JUVENILE Y/N</td><td><?php echo $StudentInfo->emergency_cont_no;?></td> </tr> <!--tr> <!--td class="label">Semester</td><td><?php echo (empty($AcademicTerm->academic_term_name) ? "Not Set" : $AcademicTerm->academic_term_name);?></td> </tr--> </table> </br></br> <h4 class="title">INCIDENT ADDRESS</h4> <table> <tr> <td class="label">STREET</td><td colspan="3"><?php echo $StudentAddress->student_address_p_line1;?></td> <td class="label">APT/LOCATION</td><td colspan="3"><?php echo $StudentAddress->student_address_p_line2;?></td> </tr> <tr> <td class="label">CITY</td><td colspan="3"><?php echo $StudentAddress->student_p_house_no;?></td> <td class="label">ZIP CODE</td><td colspan="3"><?php echo $StudentAddress->student_address_p_pin;?></td> </tr> </table> <h4 class="title">REPORT COMPLAINANT</h4> <table> <tr> <td class="label">COMPLAINANT</td><td colspan="3"><?php echo $StudentAddress->student_c_house_no;?></td> <td class="label">PHONE NUMBER</td><td colspan="3"><?php echo $StudentAddress->student_address_c_phone;?></td> </tr> </table> <h4 class="title">REPORT NARRATIVE</h4> <table> <tr> <td colspan="3"><?php echo nl2br($StudentInfo->student_guardian_occupation_address);?></td> </tr> </table> </br></br> <?php echo "</br></br>"; ?> <h4 class="title">DOCUMENTS ATTACHED TO REPORT</h4> <?php $k=0; if ($student_docs != null){ ?> <table> <tr> <th> LOCAL NUMBER </th> <th> TITLE </th> <th> DOCUMENT CATEGORY </th> <th width="70px"> DESCRIPTION </th> <th> DATE SUBMITTED </th> </tr> <?php foreach($student_docs as $m=>$v) { $StudentDocs = StudentDocs::model()->findByPk($v['student_docs_trans_stud_docs_id']); ?> <tr> <td> <?php echo ++$k; ?> </td> <td> <?php echo $StudentDocs->title;?> </td> <td> <?php echo DocumentCategoryMaster::model()->findByPk($StudentDocs->doc_category_id)->doc_category_name; ?> </td> <td width="70px"> <?php echo $StudentDocs->student_docs_desc; ?> </td> <td> <?php $docdate = date_create($StudentDocs->student_docs_submit_date); echo date_format($docdate,'d-m-Y');?> </td> </tr> <?php }// end for loop ?> </table> <?php } else echo "NO DOCUMENTS AVAILABLE"; ?>
  6. What do you need? The PHP side for the PDF generator or the PHP/HTML side that controls the text field boxes?
  7. I have a data textbox area that our employees type an incident report into. When we hit print, it generates a PDF report including other information and the text field (the report). The only problem is if the report is lenghty it will shift the entire text area to a seperate page leaving a good portion of the first page blank. I have attached a report showing what I'm talking about. Is this something that can be fixed by adding something to the code? I really would like to keep a portion of the narritave on one page and have it flow to the second page. ANYONE who can figure out a way to do this please let me know! StundentFinalView.pdf
  8. Hello everyone. I have a report generator for my database and for some reason it is putting a watermark of our company logo in the middle of each page. I have attached the code for the beginning of the script that makes the PDF generator work. Maybe you can find where it should be removed because I am not finding it. <style> table{ display: table; border-collapse: collapse; border:1.5px solid #74b9f0; font-size: 12.5px; width:100%; } .no_border tr,td{ border:none; border:hidden; /* background:none; */ border:1.5px solid white; } table tr:nth-child(even) { /*(even) or (2n 0)*/ background: #f1f6ff; } table tr:nth-child(odd) { /*(odd) or (2n 1)*/ background: white; } th{text-align:left;font-weight:normal;color:#990a10;width:110px;border:0.4px solid #74b9f0;height:24px;} .title{color:black;} td{border:0.4px solid #74b9f0;height:24px;} .label{text-align:left;font-weight:normal;color:#990a10;width:110px;height:24px;} </style> <?php $StudentInfo = StudentInfo::model()->findByPk($student_transaction[0]->student_transaction_student_id); $AcademicTermPeriod = AcademicTermPeriod::model()->findByPk($student_transaction[0]->academic_term_period_id); $AcademicTerm = AcademicTerm::model()->findByPk($student_transaction[0]->academic_term_id); if($student_transaction[0]->student_transaction_nationality_id != null) $Nationality = Nationality::model()->findByPk($student_transaction[0]->student_transaction_nationality_id); else $Nationality = new Nationality; $Batch = Batch::model()->findByPk($student_transaction[0]->student_transaction_batch_id); $Course = Course::model()->findByPk($student_transaction[0]->course_id); if($student_transaction[0]->student_transaction_languages_known_id != null) $LanguagesKnown = LanguagesKnown::model()->findByPk($student_transaction[0]->student_transaction_languages_known_id); if($student_transaction[0]->student_transaction_student_address_id != null) $StudentAddress = StudentAddress::model()->findByPk($student_transaction[0]->student_transaction_student_address_id); else $StudentAddress = new StudentAddress; if($student_transaction[0]->student_transaction_parent_id != null || $student_transaction[0]->student_transaction_parent_id != 0) $parent = ParentLogin::model()->findByPk($student_transaction[0]->student_transaction_parent_id); else $parent = new ParentLogin; ?> <h3 class="title">CALL RECORDS SUMMARY</h3> <table class="no_border"> </table>
  9. I am now trying to get the nl2br to work with my PDF final view when I go to print a report. Here is the code: <td class="label">BODY</td><td colspan="3"><?php echo $StudentInfo->student_guardian_occupation_address;?></td> Where would I put the nl2br in this case?
  10. You are amazing! It worked perfectly! My final question and to get out of your hair with this- I have my SQL tables set to VCHAR (1000) characters. However, when I type something it cuts me off at 100 characters and won't let any more characters go. Maybe you could shine some light on this.
  11. Someone told me my problem is as you said needing to add nl2br into my code. I am struggling extremely on trying to get this figured out. Below is my HTML for viewing the notes section and the PHP code that is making it work. Could someone possibly edit it and show me what I need to do correctly. As I said I am new and doing this so any guidance is appreciated. PHP: <div class="row"> <?php echo $form->labelEx($info,'student_guardian_occupation_address'); ?> <?php echo $form->textArea($info,'student_guardian_occupation_address',array('size'=>59,'maxlength'=>500,'style'=>'width:1200px;height:340px;margin-bottom:15px')); ?><span class="status"> </span> <?php echo $form->error($info,''); ?> </div> Here is the HTML code for viewing it: <td class="table-cell-title">NARRATIVE</td> <td class="table-cell-content"> <?php echo (!empty($studInfo->Rel_Stud_Info->student_guardian_occupation_address) ? $studInfo->Rel_Stud_Info->student_guardian_occupation_address : "Not Set"); ?></td>
  12. It is not working for me! I tested it and it's not showing up. However, I found that if I type <br> into the notes section when I am adding notes it will space the thing but I really would like it to do it automatically.
  13. Hello! What exactly do you suggest I change? I have never used nl2br before. If you could maybe give me a little explination that would help me out tremendously. I basically want to be able to type my notes and the spaces automatically translate to the PDF and overview screen. If that makes any sense from what I posed above.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.