phpBMS

Show
Ignore:
Timestamp:
04/07/09 11:44:18 (3 years ago)
Author:
nate
Message:
  • Merged Nathan branch back into trunk.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/base/notes_addedit.php

    r384 r485  
    1 <?php  
     1<?php 
    22/* 
    33 $Rev$ | $LastChangedBy$ 
     
    3737 +-------------------------------------------------------------------------+ 
    3838*/ 
    39  
    40         require_once("../../include/session.php");       
     39//var_dump($_POST); 
     40//exit; 
     41        require_once("../../include/session.php"); 
    4142        require_once("include/fields.php"); 
    4243        require_once("include/tables.php"); 
    4344        require_once("include/notes.php"); 
    4445 
    45         if(isset($_GET["backurl"])){  
     46        if(isset($_GET["backurl"])){ 
    4647                $backurl=$_GET["backurl"]; 
    4748                if(isset($_GET["refid"])) 
     
    4950        } else 
    5051                $backurl = NULL; 
    51                  
     52 
    5253        $thetable = new notes($db,12,$backurl); 
    5354        $therecord = $thetable->processAddEditPage(); 
    5455 
    5556        if(isset($therecord["phpbmsStatus"])) 
    56                 $statusmessage = $therecord["phpbmsStatus"];     
     57                $statusmessage = $therecord["phpbmsStatus"]; 
    5758 
    5859 
     
    6970                $theform->onsubmit = "return submitForm(this)"; 
    7071                $theform->id = "record"; 
    71                  
     72 
    7273                $temparray = array("Note"=>"NT","Task"=>"TS","Event"=>"EV","System Message"=>"SM"); 
    7374                $theinput = new inputBasicList("thetype",$therecord["type"],$temparray,"type"); 
     
    7576                $theinput->setAttribute("onchange","changeType()"); 
    7677                $theform->addField($theinput); 
    77                  
     78 
    7879                $theinput = new inputField("subject",$therecord["subject"], "title" ,true); 
    79                 $theform->addField($theinput);           
     80                $theform->addField($theinput); 
    8081 
    8182                $temparray = array("Highest"=>3,"High"=>2,"Medium"=>1,"Normal"=>0,"Low"=>-1,"Lowest"=>-2); 
    8283                $theinput = new inputBasicList("importance",$therecord["importance"],$temparray,"importance",false); 
    8384                $theform->addField($theinput); 
    84                  
     85 
    8586                $theinput = new inputCheckbox("private",$therecord["private"]); 
    8687                $theform->addField($theinput); 
    87                  
     88 
    8889                $theinput = new inputDatePicker("startdate",$therecord["startdate"], "start date" ,false, 11, 15, false); 
    89                 $theinput->setAttribute("onchange","checkEndDate();");                           
     90                $theinput->setAttribute("onchange","checkEndDate();"); 
    9091                $theform->addField($theinput); 
    9192 
    9293                $theinput = new inputTimePicker("starttime",$therecord["starttime"], "start time" ,false,11, 15, false); 
    93                 $theinput->setAttribute("onchange","checkEndDate();");                           
    94                 $theform->addField($theinput);           
    95                  
     94                $theinput->setAttribute("onchange","checkEndDate();"); 
     95                $theform->addField($theinput); 
     96 
    9697                $theinput = new inputDatePicker("enddate",$therecord["enddate"], "end date" ,false, 11, 15, false); 
    9798                $theform->addField($theinput); 
    9899 
    99100                $theinput = new inputTimePicker("endtime",$therecord["endtime"], "end time" ,false,11, 15, false); 
    100                 $theform->addField($theinput);           
     101                $theform->addField($theinput); 
    101102 
    102103                $theinput = new inputCheckbox("completed",$therecord["completed"],"completed",false,false); 
     
    110111                $theinput = new inputChoiceList($db, "status",$therecord["status"],"notestatus"); 
    111112                $theform->addField($theinput); 
    112                  
     113 
    113114                $theinput = new inputSmartSearch($db, "assignedtoid", "Pick Active User", $therecord["assignedtoid"], "assigned to", false, 18, 255, false); 
    114115                $theform->addField($theinput); 
    115                  
     116 
    116117                $theinput = new inputDatePicker("assignedtodate",$therecord["assignedtodate"], "follow up date"); 
    117118                $theform->addField($theinput); 
    118119 
    119120                $theinput = new inputTimePicker("assignedtotime",$therecord["assignedtotime"], "follow up time" ,false,11, 15, false); 
    120                 $theform->addField($theinput);           
     121                $theform->addField($theinput); 
    121122 
    122123                $theinput = new inputChoiceList($db, "category",$therecord["category"],"notecategories"); 
     
    129130                else 
    130131                        $repeatBase = mktime(); 
    131                  
     132 
    132133                $theinput = new inputCheckbox("repeating",$therecord["repeating"],"repeat"); 
    133134                $theinput->setAttribute("onchange","checkRepeat();"); 
    134135                $theform->addField($theinput); 
    135                  
     136 
    136137                $temparray = array("Daily"=>"Daily", "Weekly"=>"Weekly", "Monthly"=>"Monthly", "Yearly"=>"Yearly"); 
    137138                $theinput = new inputBasiclist("repeattype",$therecord["repeattype"],$temparray,"frequency"); 
    138139                $theinput->setAttribute("onchange","changeRepeatType();"); 
    139140                $theform->addField($theinput); 
    140                  
     141 
    141142                $theinput = new inputField("repeatevery",$therecord["repeatevery"],"frequency of repeating",false,"integer",2,4,false); 
    142143                $theform->addField($theinput); 
    143                  
     144 
    144145                $theinput = new inputBasiclist("monthlyontheweek",$therecord["repeatontheweek"],$thetable->weekArray,"on the week of",false); 
    145146                $theinput2 = new inputBasiclist("yearlyontheweek",$therecord["repeatontheweek"],$thetable->weekArray,"on the week of",false); 
     
    150151                        $weekNumber = ceil(date("d",$repeatBase)/7); 
    151152                        if($weekNumber > 4) $weekNumber = 5; 
    152                          
     153 
    153154                        $theinput->value = $weekNumber; 
    154155                        $theinput2->value = $weekNumber; 
    155                                                  
     156 
    156157                } 
    157158                $theform->addField($theinput); 
    158159                $theform->addField($theinput2); 
    159                  
     160 
    160161                $temparray = array(); 
    161162                for($i=1; $i<8; $i++) 
     
    186187                $theinput = new inputField("repeattimes",$therecord["repeattimes"],"repeat until number of times",false,"integer",3,5,false); 
    187188                $theform->addField($theinput); 
    188                  
     189 
    189190                if(!$therecord["repeatuntil"]) 
    190191                        $therecord["repeatuntil"] = dateToString(mktime(),"SQL"); 
     
    193194                $theform->addField($theinput); 
    194195                //end repeat fields 
    195                                  
     196 
    196197                $theform->jsMerge(); 
    197198                //============================================================== 
    198                 //End Form Elements      
    199                  
     199                //End Form Elements 
     200 
    200201        include("header.php"); 
    201          
     202 
    202203?><div class="bodyline"> 
    203204        <?php $theform->startForm($pageTitle)?> 
     
    211212                        <input name="thebackurl" id="thebackurl" type="hidden" value="<?php if(isset($_GET["backurl"])) echo $_GET["backurl"]; ?>" /> 
    212213                </p> 
    213                  
     214 
    214215                <p> 
    215216                        <?php $theform->showField("thetype")?> 
    216                         <input type="hidden" id="typeCheck" name="typeCheck" value="<?php echo $therecord["type"]?>" />          
     217                        <input type="hidden" id="typeCheck" name="typeCheck" value="<?php echo $therecord["type"]?>" /> 
    217218                </p> 
    218                  
     219 
    219220                <p><?php $theform->showField("subject") ?></p> 
    220221        </fieldset> 
    221          
     222 
    222223        <div id="leftSideDiv"> 
    223224                <fieldset> 
     
    234235                                <label for="startdate" id="starttext">start</label><br /> 
    235236                                <input name="dostart" id="startcheck" type="checkbox" value="1" <?php if($therecord["startdate"]) echo "checked=\"checked\"" ?> onclick="dateChecked('start')" class="radiochecks" /> 
    236                                 &nbsp;<?php $theform->showField("startdate");?>  
     237                                &nbsp;<?php $theform->showField("startdate");?> 
    237238                                &nbsp;<?php $theform->showField("starttime");?> 
    238239                        </p> 
     
    240241                                <label for="enddate" id="endtext">end</label><br /> 
    241242                                <input name="doend" id="endcheck" type="checkbox" value="1" <?php if($therecord["enddate"]) echo "checked=\"checked\"" ?> onclick="dateChecked('end')" class="radiochecks" /> 
    242                                 &nbsp;<?php $theform->showField("enddate");?>    
     243                                &nbsp;<?php $theform->showField("enddate");?> 
    243244                                &nbsp;<?php $theform->showField("endtime");?> 
    244245                        </p> 
    245246                </fieldset> 
    246                  
     247 
    247248                <div id="thecompleted" class="fauxP"> 
    248249                        <p> 
     
    251252                                <?php $theform->showField("completeddate")?> 
    252253                        </p> 
    253                         <p id="thestatus"><?php $theform->showField("status") ?></p>                     
     254                        <p id="thestatus"><?php $theform->showField("status") ?></p> 
    254255                </div> 
    255                  
     256 
    256257                <fieldset> 
    257258                        <legend><label for="ds-assignedtoid">assigned to</label></legend> 
     
    275276                        <p><?php $theform->showField("assignedtodate");?> &nbsp; <?php $theform->showField("assignedtotime")?></p> 
    276277                </fieldset> 
    277                  
     278 
    278279                <input id="attachedtabledefid" name="attachedtabledefid" type="hidden" value="<?php echo $therecord["attachedtabledefid"]?>" /> 
    279280                <fieldset id="theassociated"> 
     
    283284                                        <input id="assocarea" type="text" readonly="readonly" class="uneditable" value="<?php echo $attachedtableinfo["displayname"];?>" /> 
    284285                                </p> 
    285                                                                  
     286 
    286287                                <p> 
    287288                                        <label for="attachedid">record id</label><br /> 
     
    296297                                <input name="location" id="location" type="text" value="<?php echo $therecord["location"]?>"/> 
    297298                        </p> 
    298                          
    299                         <p><?php $theform->showField("category") ?></p>                  
    300                 </fieldset> 
    301                  
     299 
     300                        <p><?php $theform->showField("category") ?></p> 
     301                </fieldset> 
     302 
    302303        </div> 
    303304 
     
    316317 
    317318        <div id="repeatDiv"> 
    318          
     319 
    319320                <div <?php if($therecord["parentid"]) echo 'style="display:none;"'?>> 
    320321                        <input type="hidden" id="bypass" name="bypass" value=""/> 
     
    325326                        <fieldset> 
    326327                                <legend>repeat</legend> 
    327                                  
     328 
    328329                                <p><?php $theform->showField("repeating")?></p> 
    329                                  
     330 
    330331                                <div id="repeatOptions" <?php if(!$therecord["repeating"]) echo 'style="display:none"'?>> 
    331                                  
     332 
    332333                                        <p><?php $theform->showField("repeattype")?></p> 
    333                  
     334 
    334335                                        <p>every <?php $theform->showField("repeatevery")?> <span id="repeatTypeText">day(s)</span></p> 
    335                  
     336 
    336337                                        <div id="DailyDiv"></div> 
    337                  
     338 
    338339                                        <div id="WeeklyDiv"> 
    339340                                                <p><?php $thetable->showWeeklyOptions($therecord,$repeatBase)?></p> 
    340341                                        </div> 
    341                  
     342 
    342343                                        <div id="MonthlyDiv"> 
    343344                                                <p><input type="radio" id="monthlyEach" name="monthlyWhat" onchange="monthlyChange();" value="1" <?php if(!$therecord["repeatontheday"]) echo 'checked="checked"'?> /><label for="monthlyEach"> each</label></p> 
    344                                                  
     345 
    345346                                                <p><?php $thetable->showMonthlyOptions($therecord,$repeatBase)?></p> 
    346                                                  
     347 
    347348                                                <p><input type="radio" id="monthlyOnThe" name="monthlyWhat" onchange="monthlyChange();" value="2" <?php if($therecord["repeatontheday"]) echo 'checked="checked"'?> /><label for="monthlyOnThe"> on the</label></p> 
    348349                                                <p> 
     
    351352                                                </p> 
    352353                                        </div> 
    353                  
     354 
    354355                                        <div id="YearlyDiv"> 
    355356                                                <p><?php $thetable->showYearlyOptions($therecord,$repeatBase)?></p> 
    356                                                  
     357 
    357358                                                <p><input id="yearlyOnThe" type="checkbox" name="yearlyOnThe" onclick="yearlyOnTheChecked();" value="1" <?php if($therecord["repeattype"]=="Yearly" && $therecord["repeatontheday"]) echo 'checked="checked"'?>/><label for="yearlyOnThe"> on the</label></p> 
    358359                                                <p> 
     
    360361                                                        <?php $theform->showField("yearlyontheday");?> 
    361362                                                </p> 
    362                                                  
     363 
    363364                                        </div> 
    364365                                </div> 
    365366                        </fieldset> 
    366          
     367 
    367368                        <fieldset id="repeatEnding" <?php if(!$therecord["repeating"]) echo 'style="display:none"'?>> 
    368369                                <legend>end</legend> 
     
    383384                        <p>This record was created from a repeated task/event.</p> 
    384385                        <p>Click the <strong>Edit Repeating Options</strong> button to edit the options for the repeatable parent record.</p> 
    385                         <p class="notes">Any unsaved changes with the current record will be lost.</p>                   
     386                        <p class="notes">Any unsaved changes with the current record will be lost.</p> 
    386387                        <p><input id="goparent" name="goparent" type="button" value="Edit Repeating Options..." onclick="goParent('<?php echo getAddEditFile($db,12) ?>')" class="Buttons" /></p> 
    387388                </fieldset> 
    388389                <?php }//endif ?> 
    389390        </div> 
    390         <?php  
     391        <?php 
    391392                $theform->showCreateModify($phpbms,$therecord); 
    392393                $theform->endForm(); 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.