1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<?php
$Option=$_POST['Option'];
$TableName = array('Inscriptions' => 'sad_inscriptions', 'Clients' => 'sad_inscriptions', 'Lessons' => 'sad_lessons', 'Messages' => 'sad_messages');
$Where = array('Inscriptions' => "Client = '0'" , 'Clients' => "Client = '1'" , 'Lessons' => Null , 'Messages' => Null);
$ParentLastNameField = Array ("ParentLastName" , "Nom de Famille" , 30, 30, 0, "130", "center");
$ParentFirstNameField = Array ("ParentFirstName", "Prénom du parent" , 30, 30, 0, "130", "center");
$ChildFirstNameField = Array ("ChildFirstName" , "Prénom de l'enfant", 30, 30, 0, "130", "center");
$AddressField = Array ("Address" , "Adresse" , 30, 30, 0, "250", "center");
$CityField = Array ("City" , "Ville" , 30, 30, 0, "150", "center");
$PhoneField = Array ("Phone" , "Téléphone" , 30, 30, 0, "80" , "center");
$MobilePhoneField = Array ("MobilePhone" , "Portable" , 30, 30, 0, "80" , "center");
$MailField = Array ("Mail" , "Adresse Mail" , 30, 30, 0, "150", "center");
$ClassField = Array ("Class" , "Classe" , 30, 30, 0, "70" , "center");
$SectionField = Array ("Section" , "Section" , 30, 30, 0, "70" , "center");
$PerformanceField = Array ("Performance" , "Prestation" , 30, 30, 0, "70" , "center");
$MatterField = Array ("Matter" , "Matière" , 30, 30, 0, "90" , "center");
$DuringField = Array ("During" , "Durée" , 30, 30, 0, "50" , "center");
$DateLessonField = array("DateLesson" , "Date" , 30, 30, 0, "80" , "center");
$TimeLessonField = array("TimeLesson" , "Heure" , 30, 30, 0, "80" , "center");
$DuringLessonField = array("DuringLesson" , "Durée" , 30, 30, 0, "80" , "center");
$DescriptionField = array("Description" , "Description" , 30, 30, 0, "250", "center");
$CommentsField = array("Comments" , "Commentaire" , 30, 30, 0, "250", "center");
$PaidField = array("Paid" , "Payé" , 30, 30, 0, "50" , "center");
$SubjectField = array("Subject" , "Sujet" , 30, 30, 0, "150", "center");
$BodyField = array("Body" , "Message" , 30, 30, 0, "300", "center");
$PersonFields = array($ParentLastNameField, $ParentFirstNameField, $ChildFirstNameField, $AddressField, $CityField, $PhoneField, $MobilePhoneField, $MailField, $ClassField, $SectionField, $PerformanceField, $MatterField, $DuringField);
$LessonsFields = array($ParentLastNameField, $ParentFirstNameField, $ChildFirstNameField, $DateLessonField, $TimeLessonField, $DuringLessonField, $DescriptionField, $CommentsField, $PaidField);
$MessagesFields = array($ParentLastNameField, $ParentFirstNameField, $MailField, $SubjectField, $BodyField);
$OptionsFields = array('Inscriptions' => $PersonFields, 'Clients' => $PersonFields, 'Lessons' => $LessonsFields, 'Messages' => $MessagesFields);
include ("../General_structure/DataGrid/phpmydatagrid.class.php");
$objGrid = new datagrid;
$objGrid -> friendlyHTML();
$objGrid -> pathtoimages("../General_structure/DataGrid/images/");
$objGrid -> closeTags(true);
$objGrid -> form(StrToUpper($Option), true);
$objGrid -> methodForm("POST");
$objGrid -> conectadb("localhost", "root", "", "SAD_DATASBASE");
$objGrid -> tabla ($TableName[$Option]); //
$objGrid -> buttons(true,true,true,true);
$objGrid -> keyfield("Id");
$objGrid -> FooterGrid("<div style='float:left'>© 2007 Gurusistemas.com</div>");
$objGrid -> datarows(12);
$objGrid -> orderby("Id", "DESC");
$objGrid -> noorderarrows();
foreach ($OptionsFields[$_POST['Option']] as $OptionsFields[$_POST['Option']]) //
{
call_user_func_array(array($objGrid, 'formatColumn'), $OptionsFields[$_POST['Option']]);
}
$objGrid-> checkable();
$objGrid -> where ($Where[$Option]);
$objGrid -> setHeader();
$objGrid -> ajax("silent");
$objGrid -> grid();
$objGrid -> desconectar();
?> |