From: Thomas L. <tl...@us...> - 2004-11-05 14:06:18
|
Update of /cvsroot/phpwebsite-comm/modules/joboffers/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27223 Modified Files: Joboffer.php Log Message: Corrected several typos which prevented the script from running Index: Joboffer.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/joboffers/class/Joboffer.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Joboffer.php 21 Jan 2004 19:12:53 -0000 1.5 --- Joboffer.php 5 Nov 2004 14:05:12 -0000 1.6 *************** *** 126,130 **** * @access private */ ! var $_jobstart /** --- 126,130 ---- * @access private */ ! var $_jobstart; /** *************** *** 215,221 **** } /* else use the date entered in the database */ ! else ( $result = $GLOBALS["core"]->sqlSelect("mod_joboffers", "id", $JOB_id); ! if $result { if ($_SESSION["OBJ_user"]->username == $result[0]["userCreated"]) { $this->_id = $JOB_id; --- 215,221 ---- } /* else use the date entered in the database */ ! else { $result = $GLOBALS["core"]->sqlSelect("mod_joboffers", "id", $JOB_id); ! if ($result) { if ($_SESSION["OBJ_user"]->username == $result[0]["userCreated"]) { $this->_id = $JOB_id; *************** *** 265,274 **** $tags["TITLE"] = $_SESSION["translate"]->it("Search for a job"); $tags["CT_LABEL"] = $_SESSION["translate"]->it("Company type"); ! $tags["CT_RETAIL"] = PHPWS_Form::formCheckbox("JOB_retail",,,,$_SESSION["translate"]->it("Retail pharmacy")); ! $tags["CT_HOSPITAL"] = PHPWS_Form::formCheckbox("JOB_hospital"),,,,$_SESSION["translate"]->it("Hospital")); ! $tags["CT_COMPANY"] = PHPWS_Form::formCheckbox("JOB_company"),,,,$_SESSION["translate"]->it("Company")); ! $tags["CT_UNIVERSITY"] = PHPWS_Form::formCheckbox("JOB_university"),,,,$_SESSION["translate"]->it("University")); ! $tags["CT_ADMIN"] = PHPWS_Form::formCheckbox("JOB_admin"),,,,$_SESSION["translate"]->it("Administration")); ! $tags["CT_OTHER"] = PHPWS_Form::formCheckbox("JOB_other"),,,,$_SESSION["translate"]->it("Other")); $tags["ZIP_LABEL"] = $_SESSION["translate"]->it("zipcode"); $tags["ZIPCODE"] = PHPWS_Form::formTextField("JOB_zipcode", $this->_zipcode, 5, 5); --- 265,274 ---- $tags["TITLE"] = $_SESSION["translate"]->it("Search for a job"); $tags["CT_LABEL"] = $_SESSION["translate"]->it("Company type"); ! $tags["CT_RETAIL"] = PHPWS_Form::formCheckBox("JOB_retail",0,1,NULL,$_SESSION["translate"]->it("Retail pharmacy")); ! $tags["CT_HOSPITAL"] = PHPWS_Form::formCheckBox("JOB_hospital",0,1,NULL,$_SESSION["translate"]->it("Hospital")); ! $tags["CT_COMPANY"] = PHPWS_Form::formCheckBox("JOB_company",0,1,NULL,$_SESSION["translate"]->it("Company")); ! $tags["CT_UNIVERSITY"] = PHPWS_Form::formCheckBox("JOB_university",0,1,NULL,$_SESSION["translate"]->it("University")); ! $tags["CT_ADMIN"] = PHPWS_Form::formCheckBox("JOB_admin",0,1,NULL,$_SESSION["translate"]->it("Administration")); ! $tags["CT_OTHER"] = PHPWS_Form::formCheckBox("JOB_other",0,1,NULL,$_SESSION["translate"]->it("Other")); $tags["ZIP_LABEL"] = $_SESSION["translate"]->it("zipcode"); $tags["ZIPCODE"] = PHPWS_Form::formTextField("JOB_zipcode", $this->_zipcode, 5, 5); *************** *** 289,311 **** $tags["TITLE"] = $_SESSION["translate"]->it("Extended search for job offers"); $tags["CT_LABEL"] = $_SESSION["translate"]->it("Company type"); ! $tags["CT_RETAIL"] = PHPWS_Form::formCheckbox("JOB_retail",,,,$_SESSION["translate"]->it("Retail pharmacy")); ! $tags["CT_HOSPITAL"] = PHPWS_Form::formCheckbox("JOB_hospital",,,,$_SESSION["translate"]->it("Hospital")); ! $tags["CT_COMPANY"] = PHPWS_Form::formCheckbox("JOB_company",,,,$_SESSION["translate"]->it("Company")); ! $tags["CT_UNIVERSITY"] = PHPWS_Form::formCheckbox("JOB_university",,,,$_SESSION["translate"]->it("University")); ! $tags["CT_ADMIN"] = PHPWS_Form::formCheckbox("JOB_admin",,,,$_SESSION["translate"]->it("Administration")); ! $tags["CT_OTHER"] = PHPWS_Form::formCheckbox("JOB_other",,,,$_SESSION["translate"]->it("Other")); $tags["CITY_LABEL"] = $_SESSION["translate"]->it("zipcode/city"); ! $tags["ZIPCODE"] = PHPWS_Form::formTextField("JOB_zipcode",, 5, 5); ! $tags["CITY"] = PHPWS_Form::formTextField("JOB_city",,20,100); ! $tags["INTERNSHIP"] = PHPWS_Form::formCheckBox("JOB_internship",,,, $_SESSION["translate"]->it("Should offer internships")); $tags["DURATION_LABEL"] = $_SESSION["translate"]->it("Job duration"); ! $tags["DURATION_6"] = PHPWS_Form::formCheckbox("JOB_duration6",,,,$_SESSION["translate"]->it("6 months")); ! $tags["DURATION_12"] = PHPWS_Form::formCheckbox("JOB_duration12",,,,$_SESSION["translate"]->it("12 months")); ! $tags["DURATION_6OR12"] = PHPWS_Form::formCheckbox("JOB_duration6or12",,,,$_SESSION["translate"->it("6 or 12 months")); $tags["FROMTO_LABEL"] = $_SESSION["translate"]->it("Job starts between"); $tags["STARTFROM"] = PHPWS_Form::formDate("JOB_startfrom"); $tags["TO"] = $_SESSION["translate"]->it("and"); $tags["STARTTO"] = PHPWS_Form::formDate("JOB_startto"); ! $tags["SUBMIT"] = = PHPWS_Form::formSubmit($_SESSION["translate"]->it("Search")); $elements[0] = PHPWS_Form::formHidden("module", "joboffers"); $elements[0] .= PHPWS_Form::formHidden("type", "extended"); --- 289,311 ---- $tags["TITLE"] = $_SESSION["translate"]->it("Extended search for job offers"); $tags["CT_LABEL"] = $_SESSION["translate"]->it("Company type"); ! $tags["CT_RETAIL"] = PHPWS_Form::formCheckBox("JOB_retail",0,1,NULL,$_SESSION["translate"]->it("Retail pharmacy")); ! $tags["CT_HOSPITAL"] = PHPWS_Form::formCheckBox("JOB_hospital",0,1,NULL,$_SESSION["translate"]->it("Hospital")); ! $tags["CT_COMPANY"] = PHPWS_Form::formCheckBox("JOB_company",0,1,NULL,$_SESSION["translate"]->it("Company")); ! $tags["CT_UNIVERSITY"] = PHPWS_Form::formCheckBox("JOB_university",0,1,NULL,$_SESSION["translate"]->it("University")); ! $tags["CT_ADMIN"] = PHPWS_Form::formCheckBox("JOB_admin",0,1,NULL,$_SESSION["translate"]->it("Administration")); ! $tags["CT_OTHER"] = PHPWS_Form::formCheckBox("JOB_other",0,1,NULL,$_SESSION["translate"]->it("Other")); $tags["CITY_LABEL"] = $_SESSION["translate"]->it("zipcode/city"); ! $tags["ZIPCODE"] = PHPWS_Form::formTextField("JOB_zipcode",NULL,5,5); ! $tags["CITY"] = PHPWS_Form::formTextField("JOB_city",NULL,20,100); ! $tags["INTERNSHIP"] = PHPWS_Form::formCheckBox("JOB_internship",0,1,NULL, $_SESSION["translate"]->it("Should offer internships")); $tags["DURATION_LABEL"] = $_SESSION["translate"]->it("Job duration"); ! $tags["DURATION_6"] = PHPWS_Form::formCheckBox("JOB_duration6",0,1,NULL,$_SESSION["translate"]->it("6 months")); ! $tags["DURATION_12"] = PHPWS_Form::formCheckBox("JOB_duration12",0,1,NULL,$_SESSION["translate"]->it("12 months")); ! $tags["DURATION_6OR12"] = PHPWS_Form::formCheckBox("JOB_duration6or12",0,1,NULL,$_SESSION["translate"]->it("6 or 12 months")); $tags["FROMTO_LABEL"] = $_SESSION["translate"]->it("Job starts between"); $tags["STARTFROM"] = PHPWS_Form::formDate("JOB_startfrom"); $tags["TO"] = $_SESSION["translate"]->it("and"); $tags["STARTTO"] = PHPWS_Form::formDate("JOB_startto"); ! $tags["SUBMIT"] = PHPWS_Form::formSubmit($_SESSION["translate"]->it("Search"),NULL,"JOB"); $elements[0] = PHPWS_Form::formHidden("module", "joboffers"); $elements[0] .= PHPWS_Form::formHidden("type", "extended"); *************** *** 320,324 **** */ function view ($type) { ! if (!$_POST["JOB_retail"] && !$_POST["JOB_hospital"] && !$_POST["JOB_industry" && !$_POST["JOB_university"] && !$_POST["JOB_admin"] && !$_POST["JOB_other"] && $_POST["JOB_zipcode"] == "") { --- 320,324 ---- */ function view ($type) { ! if (!$_POST["JOB_retail"] && !$_POST["JOB_hospital"] && !$_POST["JOB_industry"] && !$_POST["JOB_university"] && !$_POST["JOB_admin"] && !$_POST["JOB_other"] && $_POST["JOB_zipcode"] == "") { *************** *** 326,333 **** } else { $sql = "SELECT * FROM mod_joboffers WHERE "; ! if ($_POST["JOB_retail"] { ! $query .= "companytype = 1"; ! } ! if ($_POST["JOB_retail"] } $result = $GLOBALS["core"]->getAllAssoc($sql, TRUE); --- 326,331 ---- } else { $sql = "SELECT * FROM mod_joboffers WHERE "; ! if ($_POST["JOB_retail"]) $query .= "companytype = 1"; ! if ($_POST["JOB_hospital"]) $query .= "companytype = 3"; } $result = $GLOBALS["core"]->getAllAssoc($sql, TRUE); *************** *** 376,381 **** $tags["URL"] = PHPWS_Form::formTextField("JOB_url", $this->_url, 20, 100); $tags["START_LABEL"] = $_SESSION["translate"]->it("Job starts at"); ! $tags["START"] = PHPWS_Form::formDate("JOB_jobstart", ! $this->formatDate($this->_jobstart), substr($this->formatDate($this->_jobstart), 0, 4); $tags["DURATION_LABEL"] = $_SESSION["translate"]->it("Job duration"); $tags["DURATION_6"] = PHPWS_Form::formRadio( --- 374,378 ---- $tags["URL"] = PHPWS_Form::formTextField("JOB_url", $this->_url, 20, 100); $tags["START_LABEL"] = $_SESSION["translate"]->it("Job starts at"); ! $tags["START"] = PHPWS_Form::formDate("JOB_jobstart",NULL,NULL,NULL,NULL); $tags["DURATION_LABEL"] = $_SESSION["translate"]->it("Job duration"); $tags["DURATION_6"] = PHPWS_Form::formRadio( *************** *** 384,392 **** "JOB_duration", 12, $this->_duration, NULL, $_SESSION["translate"]->it("12 months")); $tags["DURATION_6OR12"] = PHPWS_Form::formRadio( ! "JOB_duration", 0, $this->_duration, NULL, $_SESSION["translate"->it("6 or 12 months")); $tags["INTERNSHIP"] = PHPWS_Form::formCheckBox( ! "JOB_internship", $this->_internship, $this->_internship,, $_SESSION["translate"]->it("We offer internships")); $tags["DESCRIPTION_LABEL"] = $_SESSION["translate"]->it( ! "Job description<br /><span style="small">(HTML characters are allowed)</span>"); $tags["DESCRIPTION"] = PHPWS_WizardBag::js_insert( "wysiwyg", "JOB_edit", "JOB_description") . "<br />" . --- 381,389 ---- "JOB_duration", 12, $this->_duration, NULL, $_SESSION["translate"]->it("12 months")); $tags["DURATION_6OR12"] = PHPWS_Form::formRadio( ! "JOB_duration", 0, $this->_duration, NULL, $_SESSION["translate"]->it("6 or 12 months")); $tags["INTERNSHIP"] = PHPWS_Form::formCheckBox( ! "JOB_internship", $this->_internship, $this->_internship,NULL, $_SESSION["translate"]->it("We offer internships")); $tags["DESCRIPTION_LABEL"] = $_SESSION["translate"]->it( ! "Job description<br /><span style=\"small\">(HTML characters are allowed)</span>"); $tags["DESCRIPTION"] = PHPWS_WizardBag::js_insert( "wysiwyg", "JOB_edit", "JOB_description") . "<br />" . *************** *** 415,421 **** */ function save () { ! if ($_POST["JOB_company"] { ! $this->_company = PHPWS_Text::parseInput($_POST["JOB_company"]; ! $data["company" = $this->_company; } else { $this->_error("no_company"); --- 412,418 ---- */ function save () { ! if ($_POST["JOB_company"]) { ! $this->_company = PHPWS_Text::parseInput($_POST["JOB_company"], NULL); ! $data["company"] = $this->_company; } else { $this->_error("no_company"); *************** *** 446,451 **** } ! if ($_POST["JOB_zipcode"] { ! $this->_company = PHPWS_Text::parseInput($_POST["JOB_zipcode"]; /* Since I want to use this module for Germany check if the zip code * is valid (i.e. 5 digits) --- 443,448 ---- } ! if ($_POST["JOB_zipcode"]) { ! $this->_company = PHPWS_Text::parseInput($_POST["JOB_zipcode"],NULL); /* Since I want to use this module for Germany check if the zip code * is valid (i.e. 5 digits) *************** *** 456,460 **** return; } ! $data["zipcode" = $this->_zipcode; } else { $this->_error("wrong_zipcode"); --- 453,457 ---- return; } ! $data["zipcode"] = $this->_zipcode; } else { $this->_error("wrong_zipcode"); *************** *** 463,469 **** } ! if ($_POST["JOB_city"] { ! $this->_city = PHPWS_Text::parseInput($_POST["JOB_city"]; ! $data["city" = $this->_city; } else { $this->_error("no_city"); --- 460,466 ---- } ! if ($_POST["JOB_city"]) { ! $this->_city = PHPWS_Text::parseInput($_POST["JOB_city"]); ! $data["city"] = $this->_city; } else { $this->_error("no_city"); *************** *** 499,503 **** } ! $this->_description = PHPWS_Text::parseInput($_POST["JOB_description"]; $data["description"] = $this->_description; --- 496,500 ---- } ! $this->_description = PHPWS_Text::parseInput($_POST["JOB_description"]); $data["description"] = $this->_description; *************** *** 511,515 **** $data["expiration"] = $this->expiration; if ($this->_new) { ! if ($this->add($data) { $content = $_SESSION["translate"]->it("You job was successfully saved in the database."); } else { --- 508,512 ---- $data["expiration"] = $this->expiration; if ($this->_new) { ! if ($this->add($data)) { $content = $_SESSION["translate"]->it("You job was successfully saved in the database."); } else { *************** *** 519,528 **** } } elseif ($this_id) { ! if ($this->update($data) { $content = $_SESSION["translate"]->it("Your job offer was successfully updated."); } else { $this->_error("update_failed"); $this->edit(); ! return } } --- 516,525 ---- } } elseif ($this_id) { ! if ($this->update($data)) { $content = $_SESSION["translate"]->it("Your job offer was successfully updated."); } else { $this->_error("update_failed"); $this->edit(); ! return; } } *************** *** 556,560 **** case "wrong_zipcode": ! $content .= $_SESSION["translate"]->("The zip code you entered was wrong."); break; --- 553,557 ---- case "wrong_zipcode": ! $content .= $_SESSION["translate"]->it("The zip code you entered was wrong."); break; *************** *** 592,597 **** $content .= $_SESSION["translate"]->it("The error type was <b> " . $type . "</b>."); } - } // End of function _error $GLOBALS["CNT_joboffers"]["joboffers"] .= $content; } // End of class PHPWS_Joboffer ?> \ No newline at end of file --- 589,594 ---- $content .= $_SESSION["translate"]->it("The error type was <b> " . $type . "</b>."); } $GLOBALS["CNT_joboffers"]["joboffers"] .= $content; + } // End of function _error } // End of class PHPWS_Joboffer ?> \ No newline at end of file |