diff --git a/AdditionalInfo.php b/AdditionalInfo.php index 849d8230bad28083008f96abc66e3dbd02b72bb1..0da3cd3ce53fa5f6b918dab81be92bfb68a3f0a5 100644 --- a/AdditionalInfo.php +++ b/AdditionalInfo.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $sql = "SELECT * FROM additional WHERE ResumeId=".$_SESSION['ResumeId']; $aresult = mysql_query($sql); if(mysql_num_rows($aresult)==1) { $_SESSION['existingRecord'] =true; $arow = mysql_fetch_assoc($aresult); } else $_SESSION['existingRecord'] = false; $additionalSection = new cvSection("Additional Information"); $additionalSection->cvFields[0] = new cvField("",$inputObjects = array(new formInputObject("Description","textarea",$arow['Description'],100,20))); $additionalPage = new cvPage("additional",array($additionalSection)); $additionalPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $sql = "SELECT * FROM additional WHERE ResumeId=".$_SESSION['ResumeId']; $aresult = mysql_query($sql); if(mysql_num_rows($aresult)==1) { $_SESSION['existingRecord'] =true; $arow = mysql_fetch_assoc($aresult); } else $_SESSION['existingRecord'] = false; $additionalSection = new cvSection("Additional Information"); $additionalSection->cvFields[0] = new cvField("",$inputObjects = array(new formInputObject("Description","textarea",$arow['Description'],100,20))); $additionalPage = new cvPage("additional",array($additionalSection)); $additionalPage->display(); ?> \ No newline at end of file diff --git a/AwardDetail.php b/AwardDetail.php index 759cc4603d64f6cbdf89ce85805d4e01a6c5a638..c0200ba768e0e246f73eab49da2773ab84caa83b 100644 --- a/AwardDetail.php +++ b/AwardDetail.php @@ -1 +1 @@ -<? ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "award.AwardId AS awardid,". "award.OrganizationId AS organizationid,". "award.DateGiven AS dategiven,". "award.Description AS description,". "award.Title AS title ". "FROM award ". "WHERE award.ResumeId=".$_SESSION['ResumeId']." AND award.AwardId=".@$_GET['aid']; $aDetailResult = @mysql_query($sql); if(@mysql_num_rows($aDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $adrow = @mysql_fetch_assoc($aDetailResult); $aDetailSection = new cvSection("Award Detail"); $ooption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$adrow['organizationid'],false); $aDetailSection->cvFields[0] = new cvField("Organization",array(new formOptionObject("OrganizationId",$ooption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>")); $aDetailSection->cvFields[1] = new cvField("Date Given",array(new formInputObject("DateGiven","text",$adrow['dategiven']),new formInputObject("AwardId","hidden",$adrow['awardid']))); $aDetailSection->cvFields[2] = new cvField("Award",array(new formInputObject("Title","text",$adrow['title']))); $aDetailSection->cvFields[3] = new cvField("Description",array(new formInputObject("Description","textarea",$adrow['description'],50,4))); @mysql_free_result($aDetailResult); $aDetailPage = new cvPage("Award Detail",array($aDetailSection)); $aDetailPage->displayDeleteButton = $_SESSION['existingRecord']; $aDetailPage->displayCancelButton = true; $aDetailPage->display(); ?> \ No newline at end of file +<?php ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "award.AwardId AS awardid,". "award.OrganizationId AS organizationid,". "award.DateGiven AS dategiven,". "award.Description AS description,". "award.Title AS title ". "FROM award ". "WHERE award.ResumeId=".$_SESSION['ResumeId']." AND award.AwardId=".@$_GET['aid']; $aDetailResult = @mysql_query($sql); if(@mysql_num_rows($aDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $adrow = @mysql_fetch_assoc($aDetailResult); $aDetailSection = new cvSection("Award Detail"); $ooption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$adrow['organizationid'],false); $aDetailSection->cvFields[0] = new cvField("Organization",array(new formOptionObject("OrganizationId",$ooption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>")); $aDetailSection->cvFields[1] = new cvField("Date Given",array(new formInputObject("DateGiven","text",$adrow['dategiven']),new formInputObject("AwardId","hidden",$adrow['awardid']))); $aDetailSection->cvFields[2] = new cvField("Award",array(new formInputObject("Title","text",$adrow['title']))); $aDetailSection->cvFields[3] = new cvField("Description",array(new formInputObject("Description","textarea",$adrow['description'],50,4))); @mysql_free_result($aDetailResult); $aDetailPage = new cvPage("Award Detail",array($aDetailSection)); $aDetailPage->displayDeleteButton = $_SESSION['existingRecord']; $aDetailPage->displayCancelButton = true; $aDetailPage->display(); ?> \ No newline at end of file diff --git a/AwardList.php b/AwardList.php index 1654e1f754c22a910a0403a0347cda0fc65202da..4f2f795de83a4d00372e4df1a868433e2ad83501 100644 --- a/AwardList.php +++ b/AwardList.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Award","Date Given","<a href='AwardDetail.php'>ADD</a>")); $sql = "SELECT ". "award.AwardId AS awardid,". "award.Title AS title,". "award.DateGiven AS dategiven,". "organization.Name AS name ". "FROM award, organization ". "WHERE award.OrganizationId=organization.OrganizationId AND award.ResumeId=".$_SESSION['ResumeId']; $aresult = mysql_query($sql); $i=1; while($arow = mysql_fetch_assoc($aresult)) { $cells[$i] = array( $arow['name'], $arow['title'], $arow['dategiven'], "<a href='AwardDetail.php?aid=".$arow['awardid']."'>Edit</a>"); $i++; } $awardsSection = new cvSection("Awards"); $awardsSection->cvFields[0] = new cvTableField("awardstable",$cells); $awardsPage = new cvPage("Awards",array($awardsSection)); $awardsPage->displayForm = false; $awardsPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Award","Date Given","<a href='AwardDetail.php'>ADD</a>")); $sql = "SELECT ". "award.AwardId AS awardid,". "award.Title AS title,". "award.DateGiven AS dategiven,". "organization.Name AS name ". "FROM award, organization ". "WHERE award.OrganizationId=organization.OrganizationId AND award.ResumeId=".$_SESSION['ResumeId']; $aresult = mysql_query($sql); $i=1; while($arow = mysql_fetch_assoc($aresult)) { $cells[$i] = array( $arow['name'], $arow['title'], $arow['dategiven'], "<a href='AwardDetail.php?aid=".$arow['awardid']."'>Edit</a>"); $i++; } $awardsSection = new cvSection("Awards"); $awardsSection->cvFields[0] = new cvTableField("awardstable",$cells); $awardsPage = new cvPage("Awards",array($awardsSection)); $awardsPage->displayForm = false; $awardsPage->display(); ?> \ No newline at end of file diff --git a/DropDownLookup.php b/DropDownLookup.php index 377a5219e58767bbecf73220e266b3c0264ede53..c1bbdd64ab213a08f4299eac3e67b2d8c2456479 100644 --- a/DropDownLookup.php +++ b/DropDownLookup.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); ini_set("display_errors",true); $displayKey = false; switch($_GET['table']) { case "organization": $sql = "SELECT ". "organization.Name AS Name,". "organization.OrganizationId AS OrganizationId ". "FROM organization ". "WHERE organization.CreatedBy='".$_SESSION['Login']."'";// OR organization.CreatedBy='admin' ". "ORDER BY organization.Name"; $displayFields = array("Name"); $displayFieldTypes = array("text"); $hiddenFields = array("OrganizationId"); break; case "role": $sql = "SELECT ". "role.Description AS Description, ". "role.RoleId AS RoleId ". "FROM role ". "WHERE role.CreatedBy='".$_SESSION['Login']."' ". "ORDER BY role.Description"; $displayFields = array("Description"); $displayFieldTypes = array("text"); $hiddenFields = array("RoleId"); break; case "skill_area": $sql = "SELECT ". "skill_area.Description AS Description, ". "skill_area.SkillAreaId AS SkillAreaId ". "FROM skill_area ". "WHERE skill_area.CreatedBy='".$_SESSION['Login']."' ". "ORDER BY skill_area.Description"; $displayFields = array("Description"); $displayFieldTypes = array("text"); $hiddenFields = array("SkillAreaId"); break; case "skill_item": if($_GET['id']."" == "") { $_SESSION['error'] = "Error: You must first select a valid 'Skill Area'"; header("Location: ".$_SERVER['HTTP_REFERER']); exit(); } $sql = "SELECT ". "skill_item.Description AS Description, ". "skill_item.SkillItemId AS SkillItemId, ". "skill_item.SkillAreaId AS SkillAreaId ". "FROM skill_item ". "WHERE skill_item.CreatedBy='".$_SESSION['Login']."' AND skill_item.SkillAreaId=".$_GET['id']." ". "ORDER BY skill_item.Description"; $displayFields = array("Description","SkillAreaId"); $displayFieldTypes = array("text","hidden"); $hiddenFields = array("SkillItemId"); $keyField = "SkillAreaId"; $keyValue = $_GET['id']; break; default: header("Location: ".$_SERVER['HTTP_REFERER']); exit(); break; } $_SESSION['table'] = $_GET['table']; $lresult = mysql_query($sql); echo mysql_error(); $lookupSection = generateInputArraySection2($lresult,$_GET['table'],$displayFields,$displayFieldTypes,$hiddenFields); @mysql_free_result($lresult); if(isset($_GET['id'])) { $lookupSection->cvFields[0]->inputObjects[count($lookupSection->cvFields[0]->inputObjects)]=new formInputObject($keyField,"hidden",$keyValue); } $lookupPage = new cvPage("Lookup",array($lookupSection)); $lookupPage->displayCancelButton = true; $lookupPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); ini_set("display_errors",true); $displayKey = false; switch($_GET['table']) { case "organization": $sql = "SELECT ". "organization.Name AS Name,". "organization.OrganizationId AS OrganizationId ". "FROM organization ". "WHERE organization.CreatedBy='".$_SESSION['Login']."'";// OR organization.CreatedBy='admin' ". "ORDER BY organization.Name"; $displayFields = array("Name"); $displayFieldTypes = array("text"); $hiddenFields = array("OrganizationId"); break; case "role": $sql = "SELECT ". "role.Description AS Description, ". "role.RoleId AS RoleId ". "FROM role ". "WHERE role.CreatedBy='".$_SESSION['Login']."' ". "ORDER BY role.Description"; $displayFields = array("Description"); $displayFieldTypes = array("text"); $hiddenFields = array("RoleId"); break; case "skill_area": $sql = "SELECT ". "skill_area.Description AS Description, ". "skill_area.SkillAreaId AS SkillAreaId ". "FROM skill_area ". "WHERE skill_area.CreatedBy='".$_SESSION['Login']."' ". "ORDER BY skill_area.Description"; $displayFields = array("Description"); $displayFieldTypes = array("text"); $hiddenFields = array("SkillAreaId"); break; case "skill_item": if($_GET['id']."" == "") { $_SESSION['error'] = "Error: You must first select a valid 'Skill Area'"; header("Location: ".$_SERVER['HTTP_REFERER']); exit(); } $sql = "SELECT ". "skill_item.Description AS Description, ". "skill_item.SkillItemId AS SkillItemId, ". "skill_item.SkillAreaId AS SkillAreaId ". "FROM skill_item ". "WHERE skill_item.CreatedBy='".$_SESSION['Login']."' AND skill_item.SkillAreaId=".$_GET['id']." ". "ORDER BY skill_item.Description"; $displayFields = array("Description","SkillAreaId"); $displayFieldTypes = array("text","hidden"); $hiddenFields = array("SkillItemId"); $keyField = "SkillAreaId"; $keyValue = $_GET['id']; break; default: header("Location: ".$_SERVER['HTTP_REFERER']); exit(); break; } $_SESSION['table'] = $_GET['table']; $lresult = mysql_query($sql); echo mysql_error(); $lookupSection = generateInputArraySection2($lresult,$_GET['table'],$displayFields,$displayFieldTypes,$hiddenFields); @mysql_free_result($lresult); if(isset($_GET['id'])) { $lookupSection->cvFields[0]->inputObjects[count($lookupSection->cvFields[0]->inputObjects)]=new formInputObject($keyField,"hidden",$keyValue); } $lookupPage = new cvPage("Lookup",array($lookupSection)); $lookupPage->displayCancelButton = true; $lookupPage->display(); ?> \ No newline at end of file diff --git a/EducationDetail.php b/EducationDetail.php index 7697067ea388bdb810f63b650e853ab7bd3672cf..cf666d548b0632d427792f0732ce90f4c652dcea 100644 --- a/EducationDetail.php +++ b/EducationDetail.php @@ -1 +1 @@ -<? ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "education.OrganizationId AS institutionid,". "education.EducationId AS educationid,". "degree.DegreeId AS degreeid,". "degree.DegreeTypeId AS degreetypeid,". "degree.Comments AS comments,". "degree.Name AS name,". "degree.GPA AS gpa,". "degree.DegreeDate AS degreedate,". "degree.StartDate AS startdate,". "degree.EndDate AS enddate ". "FROM degree,education ". "WHERE degree.EducationId=education.EducationId AND education.ResumeId=".$_SESSION['ResumeId']." AND education.EducationId=".@$_GET['eid']; $eDetailResult = @mysql_query($sql); if(@mysql_num_rows($eDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $edrow = @mysql_fetch_assoc($eDetailResult); $eDetailSection = new cvSection("Education Detail"); $ioption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$edrow['institutionid'],false); $eDetailSection->cvFields[0] = new cvField("Institution",array(new formOptionObject("OrganizationId",$ioption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>",new formInputObject("EducationId","hidden",$edrow['educationid']))); $eDetailSection->cvFields[1] = new cvField("Start Date",array(new formInputObject("StartDate","text",$edrow['startdate']))); $eDetailSection->cvFields[2] = new cvField("End Date",array(new formInputObject("EndDate","text",$edrow['enddate']))); $eDetailSection->cvFields[3] = new cvField("Degree",array(new formInputObject("Name","text",$edrow['name']),new formInputObject("DegreeId","hidden",$edrow['degreeid']))); $doption = optionGenerator("degree_type","Description","DegreeTypeId","DegreeTypeId",$edrow['degreetypeid'],false,$whereClause = ""); $eDetailSection->cvFields[4] = new cvField("DegreeType",array(new formOptionObject("DegreeTypeId",$doption))); //$eDetailSection->cvFields[5] = new cvField("GPA",array(new formInputObject("GPA","text",$edrow['gpa']))); //? $eDetailSection->cvFields[5] = new cvField("Comments",array(new formInputObject("Comments","textarea",$edrow['comments'],50,5))); @mysql_free_result($eDetailResult); $employmentPage = new cvPage("employment",array($eDetailSection)); $employmentPage->displayDeleteButton = true; $employmentPage->displayCancelButton = true; $employmentPage->display(); ?> \ No newline at end of file +<?php ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "education.OrganizationId AS institutionid,". "education.EducationId AS educationid,". "degree.DegreeId AS degreeid,". "degree.DegreeTypeId AS degreetypeid,". "degree.Comments AS comments,". "degree.Name AS name,". "degree.GPA AS gpa,". "degree.DegreeDate AS degreedate,". "degree.StartDate AS startdate,". "degree.EndDate AS enddate ". "FROM degree,education ". "WHERE degree.EducationId=education.EducationId AND education.ResumeId=".$_SESSION['ResumeId']." AND education.EducationId=".@$_GET['eid']; $eDetailResult = @mysql_query($sql); if(@mysql_num_rows($eDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $edrow = @mysql_fetch_assoc($eDetailResult); $eDetailSection = new cvSection("Education Detail"); $ioption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$edrow['institutionid'],false); $eDetailSection->cvFields[0] = new cvField("Institution",array(new formOptionObject("OrganizationId",$ioption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>",new formInputObject("EducationId","hidden",$edrow['educationid']))); $eDetailSection->cvFields[1] = new cvField("Start Date",array(new formInputObject("StartDate","text",$edrow['startdate']))); $eDetailSection->cvFields[2] = new cvField("End Date",array(new formInputObject("EndDate","text",$edrow['enddate']))); $eDetailSection->cvFields[3] = new cvField("Degree",array(new formInputObject("Name","text",$edrow['name']),new formInputObject("DegreeId","hidden",$edrow['degreeid']))); $doption = optionGenerator("degree_type","Description","DegreeTypeId","DegreeTypeId",$edrow['degreetypeid'],false,$whereClause = ""); $eDetailSection->cvFields[4] = new cvField("DegreeType",array(new formOptionObject("DegreeTypeId",$doption))); //$eDetailSection->cvFields[5] = new cvField("GPA",array(new formInputObject("GPA","text",$edrow['gpa']))); //? $eDetailSection->cvFields[5] = new cvField("Comments",array(new formInputObject("Comments","textarea",$edrow['comments'],50,5))); @mysql_free_result($eDetailResult); $employmentPage = new cvPage("employment",array($eDetailSection)); $employmentPage->displayDeleteButton = true; $employmentPage->displayCancelButton = true; $employmentPage->display(); ?> \ No newline at end of file diff --git a/MembershipDetail.php b/MembershipDetail.php index ace10b52fc40de802e3764b4727bd23fe9a79849..b111d4f8dda2247266433d73146cda41078e0ea7 100644 --- a/MembershipDetail.php +++ b/MembershipDetail.php @@ -1 +1 @@ -<? ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "membership.MembershipId AS membershipid,". "membership.OrganizationId AS organizationid,". "membership.StartDate AS startdate,". "membership.EndDate AS enddate,". "membership.Description AS description,". "membership.Title AS title ". "FROM membership ". "WHERE membership.ResumeId=".$_SESSION['ResumeId']." AND membership.MembershipId=".@$_GET['mid']; $mDetailResult = @mysql_query($sql); if(@mysql_num_rows($mDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $mdrow = @mysql_fetch_assoc($mDetailResult); $mDetailSection = new cvSection("Membership Detail"); $ooption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$mdrow['organizationid'],false); $mDetailSection->cvFields[0] = new cvField("Organization",array(new formOptionObject("OrganizationId",$ooption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>")); $mDetailSection->cvFields[1] = new cvField("Start Date",array(new formInputObject("StartDate","text",$mdrow['startdate']),new formInputObject("MembershipId","hidden",$mdrow['membershipid']))); $mDetailSection->cvFields[2] = new cvField("End Date",array(new formInputObject("EndDate","text",$mdrow['enddate']))); $mDetailSection->cvFields[3] = new cvField("Title",array(new formInputObject("Title","text",$mdrow['title']))); $mDetailSection->cvFields[4] = new cvField("Description",array(new formInputObject("Description","textarea",$mdrow['description'],50,4))); @mysql_free_result($mDetailResult); $mDetailPage = new cvPage("Membership Detail",array($mDetailSection)); $mDetailPage->displayDeleteButton = $_SESSION['existingRecord']; $mDetailPage->displayCancelButton = true; $mDetailPage->display(); ?> \ No newline at end of file +<?php ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "membership.MembershipId AS membershipid,". "membership.OrganizationId AS organizationid,". "membership.StartDate AS startdate,". "membership.EndDate AS enddate,". "membership.Description AS description,". "membership.Title AS title ". "FROM membership ". "WHERE membership.ResumeId=".$_SESSION['ResumeId']." AND membership.MembershipId=".@$_GET['mid']; $mDetailResult = @mysql_query($sql); if(@mysql_num_rows($mDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $mdrow = @mysql_fetch_assoc($mDetailResult); $mDetailSection = new cvSection("Membership Detail"); $ooption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$mdrow['organizationid'],false); $mDetailSection->cvFields[0] = new cvField("Organization",array(new formOptionObject("OrganizationId",$ooption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>")); $mDetailSection->cvFields[1] = new cvField("Start Date",array(new formInputObject("StartDate","text",$mdrow['startdate']),new formInputObject("MembershipId","hidden",$mdrow['membershipid']))); $mDetailSection->cvFields[2] = new cvField("End Date",array(new formInputObject("EndDate","text",$mdrow['enddate']))); $mDetailSection->cvFields[3] = new cvField("Title",array(new formInputObject("Title","text",$mdrow['title']))); $mDetailSection->cvFields[4] = new cvField("Description",array(new formInputObject("Description","textarea",$mdrow['description'],50,4))); @mysql_free_result($mDetailResult); $mDetailPage = new cvPage("Membership Detail",array($mDetailSection)); $mDetailPage->displayDeleteButton = $_SESSION['existingRecord']; $mDetailPage->displayCancelButton = true; $mDetailPage->display(); ?> \ No newline at end of file diff --git a/MembershipList.php b/MembershipList.php index dc78ae088500da0856408c4d8e1dd69a40a47662..cf4e00b6a7b90457c000a11f3e76b7bb12b875d2 100644 --- a/MembershipList.php +++ b/MembershipList.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Start Date","End Date","Title","<a href='MembershipDetail.php'>ADD</a>")); $sql = "SELECT ". "membership.MembershipId AS membershipid,". "membership.StartDate AS startdate,". "membership.EndDate AS enddate,". "membership.Title AS title,". "organization.Name AS name ". "FROM membership,organization ". "WHERE membership.OrganizationId=organization.OrganizationId AND membership.ResumeId=".$_SESSION['ResumeId']; $mresult = mysql_query($sql); $i=1; while($mrow = mysql_fetch_assoc($mresult)) { $cells[$i] = array( $mrow['name'], $mrow['startdate'], $mrow['enddate'], $mrow['title'], "<a href='MembershipDetail.php?mid=".$mrow['membershipid']."'>Edit</a>"); $i++; } $awardsSection = new cvSection("Memberships"); $awardsSection->cvFields[0] = new cvTableField("membershipstable",$cells); $awardsPage = new cvPage("Memberships",array($awardsSection)); $awardsPage->displayForm = false; $awardsPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Start Date","End Date","Title","<a href='MembershipDetail.php'>ADD</a>")); $sql = "SELECT ". "membership.MembershipId AS membershipid,". "membership.StartDate AS startdate,". "membership.EndDate AS enddate,". "membership.Title AS title,". "organization.Name AS name ". "FROM membership,organization ". "WHERE membership.OrganizationId=organization.OrganizationId AND membership.ResumeId=".$_SESSION['ResumeId']; $mresult = mysql_query($sql); $i=1; while($mrow = mysql_fetch_assoc($mresult)) { $cells[$i] = array( $mrow['name'], $mrow['startdate'], $mrow['enddate'], $mrow['title'], "<a href='MembershipDetail.php?mid=".$mrow['membershipid']."'>Edit</a>"); $i++; } $awardsSection = new cvSection("Memberships"); $awardsSection->cvFields[0] = new cvTableField("membershipstable",$cells); $awardsPage = new cvPage("Memberships",array($awardsSection)); $awardsPage->displayForm = false; $awardsPage->display(); ?> \ No newline at end of file diff --git a/MembershipsList.php b/MembershipsList.php index 3dd994e342dfc3792400bbc0d899b7d468dae551..565e3c4b2cb43d59f6de790ee5b50e9bbeeafb52 100644 --- a/MembershipsList.php +++ b/MembershipsList.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Start Date","End Date","Title","<a href='MembershipDetail.php'>ADD</a>")); $sql = "SELECT ". "membership.MembershipId AS membershipid,". "membership.StartDate AS startdate,". "membership.EndDate AS enddate,". "membership.Title AS title,". "organization.Name AS name ". "FROM membership,organization ". "WHERE membership.OrganizationId=organization.OrganizationId AND membership.ResumeId=".$_SESSION['ResumeId']; $mresult = mysql_query($sql); $i=1; while($mrow = mysql_fetch_assoc($mresult)) { $cells[$i] = array( $mrow['organization'], $mrow['startdate'], $mrow['enddate'], $mrow['title'], "<a href='MembershipDetail.php?mid=".$arow['membershipid']."'>Edit</a>"); $i++; } $awardsSection = new cvSection("Memberships"); $awardsSection->cvFields[0] = new cvTableField("membershipstable",$cells); $awardsPage = new cvPage("Awards",array($awardsSection)); $awardsPage->displayForm = false; $awardsPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Start Date","End Date","Title","<a href='MembershipDetail.php'>ADD</a>")); $sql = "SELECT ". "membership.MembershipId AS membershipid,". "membership.StartDate AS startdate,". "membership.EndDate AS enddate,". "membership.Title AS title,". "organization.Name AS name ". "FROM membership,organization ". "WHERE membership.OrganizationId=organization.OrganizationId AND membership.ResumeId=".$_SESSION['ResumeId']; $mresult = mysql_query($sql); $i=1; while($mrow = mysql_fetch_assoc($mresult)) { $cells[$i] = array( $mrow['organization'], $mrow['startdate'], $mrow['enddate'], $mrow['title'], "<a href='MembershipDetail.php?mid=".$arow['membershipid']."'>Edit</a>"); $i++; } $awardsSection = new cvSection("Memberships"); $awardsSection->cvFields[0] = new cvTableField("membershipstable",$cells); $awardsPage = new cvPage("Awards",array($awardsSection)); $awardsPage->displayForm = false; $awardsPage->display(); ?> \ No newline at end of file diff --git a/PublicationDetail.php b/PublicationDetail.php index a38861a81273833381dfb9b969dbf5038db56a9f..410f4ba4d0163328f0176b29d544051c2ae1858c 100644 --- a/PublicationDetail.php +++ b/PublicationDetail.php @@ -1 +1 @@ -<? ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "publication.PublicationTypeId AS publicationtypeid,". "publication.Publisher AS publisher,". "publication.PublishDate AS publishdate,". "publication.Title AS title,". "publication.URL AS url,". "publication.PublicationId AS publicationid,". "publication.PageNums AS pagenums ". "FROM publication ". "WHERE publication.ResumeId=".$_SESSION['ResumeId']." AND publication.PublicationId=".@$_GET['pid']; $pDetailResult = @mysql_query($sql); if(@mysql_num_rows($pDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $pdrow = @mysql_fetch_assoc($pDetailResult); $pDetailSection = new cvSection("Publication Detail"); $ptoption = optionGenerator("publication_type","Description","PublicationTypeId","PublicationTypeId",$pdrow['publicationtypeid'],false); $pDetailSection->cvFields[0] = new cvField("Type",array(new formOptionObject("PublicationTypeId",$ptoption),new formInputObject("PublicationId","hidden",$pdrow['publicationid']))); $pDetailSection->cvFields[1] = new cvField("Publisher",array(new formInputObject("Publisher","text",$pdrow['publisher']))); $pDetailSection->cvFields[2] = new cvField("Title",array(new formInputObject("Title","text",$pdrow['title']))); $pDetailSection->cvFields[3] = new cvField("Publication Date",array(new formInputObject("PublishDate","text",$pdrow['publishdate']))); $pDetailSection->cvFields[4] = new cvField("Page Number(s)",array(new formInputObject("PageNums","text",$pdrow['pagenums']))); $pDetailSection->cvFields[5] = new cvField("URL",array(new formInputObject("URL","text",$pdrow['url']))); $sql = "SELECT ". "person.PersonId AS PersonId,". "person.LastName AS LastName,". "person.FirstName AS FirstName ". "FROM person,author,publication_author ". "WHERE person.PersonId=author.PersonId AND publication_author.AuthorId=author.AuthorId AND publication_author.PublicationId=".$pdrow['publicationid']; $aresult = mysql_query($sql); $authorSection = generateInputArraySection2($aresult,"Author",array("LastName","FirstName"),array("text","text"),array("PersonId")); @mysql_free_result($pDetailResult); $publicationPage = new cvPage("publications",array($pDetailSection,$authorSection)); $publicationPage->displayDeleteButton = true; $publicationPage->displayCancelButton = true; $publicationPage->display(); ?> \ No newline at end of file +<?php ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "publication.PublicationTypeId AS publicationtypeid,". "publication.Publisher AS publisher,". "publication.PublishDate AS publishdate,". "publication.Title AS title,". "publication.URL AS url,". "publication.PublicationId AS publicationid,". "publication.PageNums AS pagenums ". "FROM publication ". "WHERE publication.ResumeId=".$_SESSION['ResumeId']." AND publication.PublicationId=".@$_GET['pid']; $pDetailResult = @mysql_query($sql); if(@mysql_num_rows($pDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $pdrow = @mysql_fetch_assoc($pDetailResult); $pDetailSection = new cvSection("Publication Detail"); $ptoption = optionGenerator("publication_type","Description","PublicationTypeId","PublicationTypeId",$pdrow['publicationtypeid'],false); $pDetailSection->cvFields[0] = new cvField("Type",array(new formOptionObject("PublicationTypeId",$ptoption),new formInputObject("PublicationId","hidden",$pdrow['publicationid']))); $pDetailSection->cvFields[1] = new cvField("Publisher",array(new formInputObject("Publisher","text",$pdrow['publisher']))); $pDetailSection->cvFields[2] = new cvField("Title",array(new formInputObject("Title","text",$pdrow['title']))); $pDetailSection->cvFields[3] = new cvField("Publication Date",array(new formInputObject("PublishDate","text",$pdrow['publishdate']))); $pDetailSection->cvFields[4] = new cvField("Page Number(s)",array(new formInputObject("PageNums","text",$pdrow['pagenums']))); $pDetailSection->cvFields[5] = new cvField("URL",array(new formInputObject("URL","text",$pdrow['url']))); $sql = "SELECT ". "person.PersonId AS PersonId,". "person.LastName AS LastName,". "person.FirstName AS FirstName ". "FROM person,author,publication_author ". "WHERE person.PersonId=author.PersonId AND publication_author.AuthorId=author.AuthorId AND publication_author.PublicationId=".$pdrow['publicationid']; $aresult = mysql_query($sql); $authorSection = generateInputArraySection2($aresult,"Author",array("LastName","FirstName"),array("text","text"),array("PersonId")); @mysql_free_result($pDetailResult); $publicationPage = new cvPage("publications",array($pDetailSection,$authorSection)); $publicationPage->displayDeleteButton = true; $publicationPage->displayCancelButton = true; $publicationPage->display(); ?> \ No newline at end of file diff --git a/PublicationList.php b/PublicationList.php index dcfadff3e5a9841a572f39d86ded5abd6443bc33..6a51fbf529af5693e340be428ccaf783343b4960 100644 --- a/PublicationList.php +++ b/PublicationList.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); ?> <? require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); ?> <? require("cv.class.php"); ?> <? $cells = array( array("Type","Title","Publisher","Publication Date","Author(s)","<a href='PublicationDetail.php'>Add</a>")); $sql = "SELECT ". "publication.Publisher AS publisher,". "publication.PublishDate AS publishdate,". "publication.Title AS title,". "publication.PublicationId AS publicationid,". "publication_type.Description AS type ". "FROM publication_type,publication ". "WHERE publication_type.PublicationTypeId=publication.PublicationTypeId AND publication.ResumeId=".$_SESSION['ResumeId']; $presult = @mysql_query($sql); echo(mysql_error()); $i=1; while($prow = @mysql_fetch_assoc($presult)) { $cells[$i] = array( $prow['type'], $prow['title'], $prow['publisher'], $prow['publishdate'], $prow['authors'], "<a href='PublicationDetail.php?pid=".$prow['publicationid']."'>Edit</a>"); $i++; } @mysql_free_result($presult); $publicationsSection = new cvSection("Publications"); $publicationsSection->cvFields[0] = new cvTableField("publicationtable",$cells); $publicationsPage = new cvPage("education",array($publicationsSection)); $publicationsPage->displayForm =false; $publicationsPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Type","Title","Publisher","Publication Date","Author(s)","<a href='PublicationDetail.php'>Add</a>")); $sql = "SELECT ". "publication.Publisher AS publisher,". "publication.PublishDate AS publishdate,". "publication.Title AS title,". "publication.PublicationId AS publicationid,". "publication_type.Description AS type ". "FROM publication_type,publication ". "WHERE publication_type.PublicationTypeId=publication.PublicationTypeId AND publication.ResumeId=".$_SESSION['ResumeId']; $presult = @mysql_query($sql); echo(mysql_error()); $i=1; while($prow = @mysql_fetch_assoc($presult)) { $cells[$i] = array( $prow['type'], $prow['title'], $prow['publisher'], $prow['publishdate'], $prow['authors'], "<a href='PublicationDetail.php?pid=".$prow['publicationid']."'>Edit</a>"); $i++; } @mysql_free_result($presult); $publicationsSection = new cvSection("Publications"); $publicationsSection->cvFields[0] = new cvTableField("publicationtable",$cells); $publicationsPage = new cvPage("education",array($publicationsSection)); $publicationsPage->displayForm =false; $publicationsPage->display(); ?> \ No newline at end of file diff --git a/ReferencesDetail.php b/ReferencesDetail.php index b200412e76707933822ddb3d903338a24935c399..4a13195f02b3b2e80bdfa11144a6657a3e8aa1db 100644 --- a/ReferencesDetail.php +++ b/ReferencesDetail.php @@ -1 +1 @@ -<? ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "person.Title AS title,". "person.LastName AS lastname,". "person.FirstName AS firstname,". "person.PersonId AS personid,". "person.Phone AS phone,". "person.Phone2 AS phone2,". "person.Mobile AS mobile,". "person.Pager AS pager,". "person.Email AS email,". "reference.ReferenceId AS referenceid,". "reference.OrganizationId AS organizationid ". "FROM reference,person ". "WHERE reference.PersonId=person.PersonId AND reference.ResumeId=".$_SESSION['ResumeId']." AND reference.ReferenceId=".@$_GET['rid']; $rDetailResult = @mysql_query($sql); if(@mysql_num_rows($rDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $rdrow = @mysql_fetch_assoc($rDetailResult); $rDetailSection = new cvSection("Reference Detail"); $rDetailSection->cvFields[0] = new cvField("Title",array(new formInputObject("Title","text",$rdrow['title']),new formInputObject("ReferenceId","hidden",$rdrow['referenceid']),new formInputObject("PersonId","hidden",$rdrow['personid']))); $rDetailSection->cvFields[1] = new cvField("First Name",array(new formInputObject("FirstName","text",$rdrow['firstname']))); $rDetailSection->cvFields[2] = new cvField("Last Name",array(new formInputObject("LastName","text",$rdrow['lastname']))); $contactSection = new cvSection("Contact Information"); $ooption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$rdrow['organizationid'],false); $contactSection->cvFields[0] = new cvField("Organization",array(new formOptionObject("OrganizationId",$ooption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>")); $contactSection->cvFields[1] = new cvField("Email",$inputObjects = array(new formInputObject("Email","text",$rdrow['email']))); $contactSection->cvFields[2] = new cvField("Phone 1",$inputObjects = array(new formInputObject("Phone","text",$rdrow['phone']))); $contactSection->cvFields[3] = new cvField("Phone 2",$inputObjects = array(new formInputObject("Phone2","text",$rdrow['phone2']))); $contactSection->cvFields[4] = new cvField("Mobile",$inputObjects = array(new formInputObject("Mobile","text",$rdrow['mobile']))); $contactSection->cvFields[5] = new cvField("Pager",$inputObjects = array(new formInputObject("Pager","text",$rdrow['pager']))); @mysql_free_result($rDetailResult); $rDetailPage = new cvPage("Reference Detail",array($rDetailSection,$contactSection)); $rDetailPage->displayDeleteButton = $_SESSION['existingRecord']; $rDetailPage->displayCancelButton = true; $rDetailPage->display(); ?> \ No newline at end of file +<?php ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $sql = "SELECT ". "person.Title AS title,". "person.LastName AS lastname,". "person.FirstName AS firstname,". "person.PersonId AS personid,". "person.Phone AS phone,". "person.Phone2 AS phone2,". "person.Mobile AS mobile,". "person.Pager AS pager,". "person.Email AS email,". "reference.ReferenceId AS referenceid,". "reference.OrganizationId AS organizationid ". "FROM reference,person ". "WHERE reference.PersonId=person.PersonId AND reference.ResumeId=".$_SESSION['ResumeId']." AND reference.ReferenceId=".@$_GET['rid']; $rDetailResult = @mysql_query($sql); if(@mysql_num_rows($rDetailResult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $rdrow = @mysql_fetch_assoc($rDetailResult); $rDetailSection = new cvSection("Reference Detail"); $rDetailSection->cvFields[0] = new cvField("Title",array(new formInputObject("Title","text",$rdrow['title']),new formInputObject("ReferenceId","hidden",$rdrow['referenceid']),new formInputObject("PersonId","hidden",$rdrow['personid']))); $rDetailSection->cvFields[1] = new cvField("First Name",array(new formInputObject("FirstName","text",$rdrow['firstname']))); $rDetailSection->cvFields[2] = new cvField("Last Name",array(new formInputObject("LastName","text",$rdrow['lastname']))); $contactSection = new cvSection("Contact Information"); $ooption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$rdrow['organizationid'],false); $contactSection->cvFields[0] = new cvField("Organization",array(new formOptionObject("OrganizationId",$ooption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>")); $contactSection->cvFields[1] = new cvField("Email",$inputObjects = array(new formInputObject("Email","text",$rdrow['email']))); $contactSection->cvFields[2] = new cvField("Phone 1",$inputObjects = array(new formInputObject("Phone","text",$rdrow['phone']))); $contactSection->cvFields[3] = new cvField("Phone 2",$inputObjects = array(new formInputObject("Phone2","text",$rdrow['phone2']))); $contactSection->cvFields[4] = new cvField("Mobile",$inputObjects = array(new formInputObject("Mobile","text",$rdrow['mobile']))); $contactSection->cvFields[5] = new cvField("Pager",$inputObjects = array(new formInputObject("Pager","text",$rdrow['pager']))); @mysql_free_result($rDetailResult); $rDetailPage = new cvPage("Reference Detail",array($rDetailSection,$contactSection)); $rDetailPage->displayDeleteButton = $_SESSION['existingRecord']; $rDetailPage->displayCancelButton = true; $rDetailPage->display(); ?> \ No newline at end of file diff --git a/ReferencesList.php b/ReferencesList.php index cfa8f4b8bdef74d0eda1ed8e26ce9c576b6b9357..3e225410301be5d486ca1307f9da5ef35f0f0c53 100644 --- a/ReferencesList.php +++ b/ReferencesList.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); ini_set("display_errors",true); $cells = array( array("Employer","Contact Name","Contact Telephone","Contact Email","<a href='ReferencesDetail.php'>ADD</a>")); $sql = "SELECT ". "organization.Name AS employer,". "person.LastName AS lastname,". "person.FirstName AS firstname,". "person.Phone AS telephone,". "reference.ReferenceId AS referenceid,". "person.Email AS email ". "FROM organization,person,reference ". "WHERE person.PersonId = reference.PersonId AND organization.OrganizationID = reference.OrganizationId AND reference.ResumeId=".$_SESSION['ResumeId']; $rresult = mysql_query($sql); $i=1; if(mysql_num_rows($rresult)>=1) { while($rrow = mysql_fetch_assoc($rresult)) { $cells[$i] = array( $rrow['employer'], $rrow['firstname']." ".$rrow['lastname'], $rrow['telephone'], $rrow['email'], "<a href='ReferencesDetail.php?rid=".$rrow['referenceid']."'>Edit</a>"); $i++; } } $referencesSection = new cvSection("References"); $referencesSection->cvFields[0] = new cvTableField("referencestable",$cells); $referencesPage = new cvPage("references",array($referencesSection)); $referencesPage->displayForm =false; $referencesPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); ini_set("display_errors",true); $cells = array( array("Employer","Contact Name","Contact Telephone","Contact Email","<a href='ReferencesDetail.php'>ADD</a>")); $sql = "SELECT ". "organization.Name AS employer,". "person.LastName AS lastname,". "person.FirstName AS firstname,". "person.Phone AS telephone,". "reference.ReferenceId AS referenceid,". "person.Email AS email ". "FROM organization,person,reference ". "WHERE person.PersonId = reference.PersonId AND organization.OrganizationID = reference.OrganizationId AND reference.ResumeId=".$_SESSION['ResumeId']; $rresult = mysql_query($sql); $i=1; if(mysql_num_rows($rresult)>=1) { while($rrow = mysql_fetch_assoc($rresult)) { $cells[$i] = array( $rrow['employer'], $rrow['firstname']." ".$rrow['lastname'], $rrow['telephone'], $rrow['email'], "<a href='ReferencesDetail.php?rid=".$rrow['referenceid']."'>Edit</a>"); $i++; } } $referencesSection = new cvSection("References"); $referencesSection->cvFields[0] = new cvTableField("referencestable",$cells); $referencesPage = new cvPage("references",array($referencesSection)); $referencesPage->displayForm =false; $referencesPage->display(); ?> \ No newline at end of file diff --git a/additional.php b/additional.php index 7b1b300e30ffa1bc73a08248ddc92cd7efbf244e..c9a119af541a52eca6b8c76f4b0d58a4edf378d0 100644 --- a/additional.php +++ b/additional.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); ?> <? require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); ?> <? require("cv.class.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Personal Information</title> <? require("/Library/WebServer/Documents/unlpub/2004sharedcode/2004includes/2004cssselector/cssselect.php"); ?> </head> <body> <? $additionalSection = new cvSection("Additional Information"); $additionalSection->cvFields[0] = new cvField("",$inputObjects = array(new formInputObject("additional_info","textarea"))); $additionalPage = new cvPage("additional",array($additionalSection)); $additionalPage->display(); ?> </body> </html> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Personal Information</title> <?php require("/Library/WebServer/Documents/unlpub/2004sharedcode/2004includes/2004cssselector/cssselect.php"); ?> </head> <body> <?php $additionalSection = new cvSection("Additional Information"); $additionalSection->cvFields[0] = new cvField("",$inputObjects = array(new formInputObject("additional_info","textarea"))); $additionalPage = new cvPage("additional",array($additionalSection)); $additionalPage->display(); ?> </body> </html> \ No newline at end of file diff --git a/agreement.php b/agreement.php index 2b08a7272196b5280d4e8d9cd06276378a0b5d76..9d068c40badf197d8e785ab49d22479e31750957 100644 --- a/agreement.php +++ b/agreement.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); ?> <? if(isset($_POST['Submit'])) { require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); $sql = "INSERT INTO resume (UserID,CreationDate) VALUES ('".$_SESSION['Login']."','".date("Y-m-d H:i:s")."')"; $result = @mysql_query($sql); if($result) { $_SESSION['ResumeId'] = mysql_insert_id($result); mysql_free_result($result); header("Location: /mycv/index.php"); exit(); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>myCV Agreement</title> </head> <body> <p>Welcome to myCV. Users of this system can edit Curricula Vitae information for display on the UNL Website.</p> <p>NOTE: Any information you enter in will be available to the World through the UNL Website.</p> <p>Click continue to create your CV record, and begin entering data. </p> <form action="<? echo($_SERVER['PHP_SELF']); ?>" method="post" id="form1"> <input type="submit" name="Submit" value="Continue" /> </form> </body> </html> \ No newline at end of file +<?php require_once("auth/authcheck.php"); if(isset($_POST['Submit'])) { require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); $sql = "INSERT INTO resume (UserID,CreationDate) VALUES ('".$_SESSION['Login']."','".date("Y-m-d H:i:s")."')"; $result = @mysql_query($sql); if($result) { $_SESSION['ResumeId'] = mysql_insert_id($result); mysql_free_result($result); header("Location: /mycv/index.php"); exit(); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>myCV Agreement</title> </head> <body> <p>Welcome to myCV. Users of this system can edit Curricula Vitae information for display on the UNL Website.</p> <p>NOTE: Any information you enter in will be available to the World through the UNL Website.</p> <p>Click continue to create your CV record, and begin entering data. </p> <form action="<?php echo($_SERVER['PHP_SELF']); ?>" method="post" id="form1"> <input type="submit" name="Submit" value="Continue" /> </form> </body> </html> \ No newline at end of file diff --git a/agreementCheck.php b/agreementCheck.php index 40d5b3a5794f541491e9de1ed519cc2ab3f9ec03..316b74bf3db87c668ba86f5979b7d652a7f8a658 100644 --- a/agreementCheck.php +++ b/agreementCheck.php @@ -1 +1 @@ -<? function agreementCheck() { require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); session_start(); $sql = "SELECT ResumeId FROM resume WHERE UserId = '".@$_SESSION['Login']."'"; $result = @mysql_query($sql); $agreeCheck = @mysql_num_rows($result); if($agreeCheck != 1) return false; else { $resumeRow = mysql_fetch_assoc($result); $_SESSION['ResumeId'] = $resumeRow["ResumeId"]; return true; } } ?> \ No newline at end of file +<?php function agreementCheck() { require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); session_start(); $sql = "SELECT ResumeId FROM resume WHERE UserId = '".@$_SESSION['Login']."'"; $result = @mysql_query($sql); $agreeCheck = @mysql_num_rows($result); if($agreeCheck != 1) return false; else { $resumeRow = mysql_fetch_assoc($result); $_SESSION['ResumeId'] = $resumeRow["ResumeId"]; return true; } } ?> \ No newline at end of file diff --git a/auth/authcheck.php b/auth/authcheck.php index c9f8dfa15a80995293db0793d28e00be9cbd635a..8e6ad44bbfd6b983cc5042832441f75630879560 100644 --- a/auth/authcheck.php +++ b/auth/authcheck.php @@ -1 +1 @@ -<? session_start(); if ($_SESSION['bolAuthenticated'] == false) { header("Location: auth/login.php?".urlencode($_SERVER['PHP_SELF'])); } ?> \ No newline at end of file +<?php session_start(); if ($_SESSION['bolAuthenticated'] == false) { header("Location: auth/login.php?".urlencode($_SERVER['PHP_SELF'])); } ?> \ No newline at end of file diff --git a/auth/authenticate.php b/auth/authenticate.php index b738f2ebc6bd6991766b8883075d1045821ce8cb..5314c64da2b993fae4dc3596b82bb729187d9169 100644 --- a/auth/authenticate.php +++ b/auth/authenticate.php @@ -1 +1 @@ -<? session_start(); if ($_REQUEST['Submit'] == "Submit") { $strUserName = trim($_POST['uid']); $strPassword = trim($_POST['pwd']); // connect to ldap server $ldapconn = @ldap_connect("unlisnotes.unl.edu"); if ($ldapconn) { // binding to ldap server $ldapbind = @ldap_bind($ldapconn, $strUserName, $strPassword); // verify binding if ($ldapbind) { //SUCCESS require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); jcvLogin($strUserName); $_SESSION['bolAuthenticated'] = true; $_SESSION['Login'] = $strUserName; $_SESSION['Status'] = ""; //Determine their resume status... require("/Library/WebServer/Documents/mycv/agreementCheck.php"); if(!agreementCheck()) { header("Location: /mycv/agreement.php"); } else if (isset($_POST['URL'])) { header("Location: ".urldecode($_POST['URL'])); } else { header("Location: /"); } @ldap_close($ldapconn); //exit to ensure code below doesn't get executed exit; } } ldap_close($ldapconn); } $_SESSION['Status'] = "error"; header("Location: login.php?".$_POST['URL']); function jcvLogin($strUserName) { $sql = "SELECT UserId FROM usr WHERE UserId = '$strUserName'"; $mysql_time = date("Y-m-d H:i:s"); if(@mysql_num_rows(@mysql_query($sql))==1) { $sql = "UPDATE usr SET LastLogon = '$mysql_time' WHERE UserID = '$strUserName'"; @mysql_query($sql); } else { /* New User, Insert new records into usr and person tables In the future, values in the person table could be automatically populated from THE LDAP server. */ $sql = "INSERT INTO person (Email) VALUES ('".$strUserName."')"; @mysql_query($sql); $sql = "INSERT INTO usr (UserId,PersonId,CreationDate,LastLogon,UserType) VALUES ('$strUserName',".mysql_insert_id().",'$mysql_time','$mysql_time','C')"; @mysql_query($sql); } } ?> \ No newline at end of file +<?php session_start(); if ($_REQUEST['Submit'] == "Submit") { $strUserName = trim($_POST['uid']); $strPassword = trim($_POST['pwd']); // connect to ldap server $ldapconn = @ldap_connect("unlisnotes.unl.edu"); if ($ldapconn) { // binding to ldap server $ldapbind = @ldap_bind($ldapconn, $strUserName, $strPassword); // verify binding if ($ldapbind) { //SUCCESS require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); jcvLogin($strUserName); $_SESSION['bolAuthenticated'] = true; $_SESSION['Login'] = $strUserName; $_SESSION['Status'] = ""; //Determine their resume status... require("/Library/WebServer/Documents/mycv/agreementCheck.php"); if(!agreementCheck()) { header("Location: /mycv/agreement.php"); } else if (isset($_POST['URL'])) { header("Location: ".urldecode($_POST['URL'])); } else { header("Location: /"); } @ldap_close($ldapconn); //exit to ensure code below doesn't get executed exit; } } ldap_close($ldapconn); } $_SESSION['Status'] = "error"; header("Location: login.php?".$_POST['URL']); function jcvLogin($strUserName) { $sql = "SELECT UserId FROM usr WHERE UserId = '$strUserName'"; $mysql_time = date("Y-m-d H:i:s"); if(@mysql_num_rows(@mysql_query($sql))==1) { $sql = "UPDATE usr SET LastLogon = '$mysql_time' WHERE UserID = '$strUserName'"; @mysql_query($sql); } else { /* New User, Insert new records into usr and person tables In the future, values in the person table could be automatically populated from THE LDAP server. */ $sql = "INSERT INTO person (Email) VALUES ('".$strUserName."')"; @mysql_query($sql); $sql = "INSERT INTO usr (UserId,PersonId,CreationDate,LastLogon,UserType) VALUES ('$strUserName',".mysql_insert_id().",'$mysql_time','$mysql_time','C')"; @mysql_query($sql); } } ?> \ No newline at end of file diff --git a/auth/login.php b/auth/login.php index 1acc68aea77d1f97295dabaa66a59f693e5f7a67..0a1f48c7f5f6c136ceb8337165ec8b68bb7feca6 100644 --- a/auth/login.php +++ b/auth/login.php @@ -1 +1 @@ -<? session_start(); include_once("/Library/WebServer/Documents/php/pageGen/pageGen.php"); //Get the URL from the querystring $URL = $_SERVER['QUERY_STRING']; $page = new unlTemplatePage(); $page->pageType = "popup"; $page->pageTitle = "Login to myCV"; $page->titleImage = "http://ucommxsrv1.unl.edu/mycv/images/popper_head_mycv.gif"; $page->displayStart(); ?> <form action="authenticate.php" method="post" name="form1" id="form1"> <? if (@$_SESSION['Status']=="error") { echo "<strong>There was an error with your login information, please try again</strong>"; } ?> <p class="sseriftext">UNL myCV allows University of Nebraska - Lincoln students, staff and faculty to create their CV/Resume for display on the UNL Website.<br> Any information entered will instantly be made available as your CV info through the Peoplefinder results page.</p><p class="sserifstoryheadsmall">NOTE: This site is currently in the BETA STATE! Any information entered may be lost as production continues on the development until a final release has been completed! Consider yourself warned!</p> <p class="sserifstoryheadsmall">Please login with your <strong>Lotus Notes</strong> login information:</p> <p><span class="sseriftext">Login:</span> <input class="menu" name="uid" type="text" id="uid" /> </p> <p><span class="sseriftext">Password:</span> <input class="menu" name="pwd" type="password" id="pwd" /> </p> <input type="hidden" name="URL" value="<? echo $URL; ?>" /> <input class="menu" name="Submit" type="submit" value="Submit" /> </form> <? $page->displayEnd(); ?> \ No newline at end of file +<?php session_start(); include_once("/Library/WebServer/Documents/php/pageGen/pageGen.php"); //Get the URL from the querystring $URL = $_SERVER['QUERY_STRING']; $page = new unlTemplatePage(); $page->pageType = "popup"; $page->pageTitle = "Login to myCV"; $page->titleImage = "http://ucommxsrv1.unl.edu/mycv/images/popper_head_mycv.gif"; $page->displayStart(); ?> <form action="authenticate.php" method="post" name="form1" id="form1"> <?php if (@$_SESSION['Status']=="error") { echo "<strong>There was an error with your login information, please try again</strong>"; } ?> <p class="sseriftext">UNL myCV allows University of Nebraska - Lincoln students, staff and faculty to create their CV/Resume for display on the UNL Website.<br> Any information entered will instantly be made available as your CV info through the Peoplefinder results page.</p><p class="sserifstoryheadsmall">NOTE: This site is currently in the BETA STATE! Any information entered may be lost as production continues on the development until a final release has been completed! Consider yourself warned!</p> <p class="sserifstoryheadsmall">Please login with your <strong>Lotus Notes</strong> login information:</p> <p><span class="sseriftext">Login:</span> <input class="menu" name="uid" type="text" id="uid" /> </p> <p><span class="sseriftext">Password:</span> <input class="menu" name="pwd" type="password" id="pwd" /> </p> <input type="hidden" name="URL" value="<? echo $URL; ?>" /> <input class="menu" name="Submit" type="submit" value="Submit" /> </form> <?php $page->displayEnd(); ?> \ No newline at end of file diff --git a/auth/logout.php b/auth/logout.php index 5cc223da649bee7677beca1252d85a0ed99bef65..6fb4a73361fbd95dbb336ddec2bf2cc818b61511 100644 --- a/auth/logout.php +++ b/auth/logout.php @@ -1,4 +1,4 @@ -<? +<?php session_start(); $_SESSION['bolAuthenticated'] = false; $_SESSION['status'] = ""; diff --git a/awards.php b/awards.php index 8a43a49309112839d5e547f16992b9434e408eec..22a60b41f6ef477e1cd74075ea65ed0eee50bb80 100644 --- a/awards.php +++ b/awards.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); ?> <? require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); ?> <? require("cv.class.php"); ?> <? $cells = array( array("Organization","Award","Date Given"), array( new cvField("",$inputObjects = array(new formInputObject("organization1"))), new cvField("",$inputObjects = array(new formInputObject("award1"))), new cvField("",$inputObjects = array(new formInputObject("date_given1"))))); $awardsSection = new cvSection("Awards"); $awardsSection->cvFields[0] = new cvTableField("awardstable",$cells); $awardsPage = new cvPage("awards",array($awardsSection)); $awardsPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Award","Date Given"), array( new cvField("",$inputObjects = array(new formInputObject("organization1"))), new cvField("",$inputObjects = array(new formInputObject("award1"))), new cvField("",$inputObjects = array(new formInputObject("date_given1"))))); $awardsSection = new cvSection("Awards"); $awardsSection->cvFields[0] = new cvTableField("awardstable",$cells); $awardsPage = new cvPage("awards",array($awardsSection)); $awardsPage->display(); ?> \ No newline at end of file diff --git a/cv.class.php b/cv.class.php index 2090fff1be4fc313b006b2216c71e7d01ddfa3c1..1b775422095b43f697023c0d7b62d5e4e4f6d873 100644 --- a/cv.class.php +++ b/cv.class.php @@ -1 +1 @@ -<? /* These Set default css class styles for cv elements */ $GLOBALS['textStyle'] = "sseriftext"; $GLOBALS['headerStyle'] = "sserifstoryhead"; $GLOBALS['subheadStyle'] = "sserifstoryheadsmall"; $GLOBALS['formFieldStyle'] = "menu"; /* The cvPage class defines an HTML page for the cv system. The cvPage object holds sections (array of cvSection objects) of cv data. */ class cvPage { var $heading; //heading for the page (not currently displayed) var $cvSections; //array of sections (cvSection objects) in this page var $displayForm; //bool value, if true form and save button are displayed (DEFAULT TRUE) var $displaySaveButton; //bool value, if true 'save button' is displayed (DEFAULT TRUE) var $displayDeleteButton; //bool value, if true 'delete button' is displayed (DEFAULT FALSE) var $displayCancelButton; //bool value, if true 'cancel button' is displayed (DEFAULT FALSE) var $displayAddButton; //bool value, if true 'add button' is displayed (DEFAULT FALSE) function cvPage($heading,$cvSections) { $this->heading = $heading; $this->cvSections = $cvSections; $this->displayForm = true; $this->displaySaveButton = true; $this->displayDeleteButton = false; $this->displayAddButton = false; $this->displayCancelButton = false; } function display() { echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'; echo '<html xmlns="http://www.w3.org/1999/xhtml">'; echo "\n<head>\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />'; echo "\n<title>".$this->heading."</title>\n"; echo "<link rel='stylesheet' href='popup_layout.css' type='text/css' />\n"; require("/Library/WebServer/Documents/unlpub/2004sharedcode/2004includes/2004cssselector/cssselect.php"); echo "<script type='text/javascript'>function MM_jumpMenu(targ,selObj,restore){ //v3.0\n". "eval(targ+\".location='".$_SERVER['PHP_SELF']."?id="."\"+selObj.options[selObj.selectedIndex].value+\"'\");\n". "if (restore) selObj.selectedIndex=0;\n". "}\n"; if(@$_SESSION['error']."" != "") { echo "alert('".addslashes($_SESSION['error'])."');\n"; $_SESSION['error'] = ""; } echo "</script>\n"; echo "</head>\n"; echo "<body>\n"; echo "<div id='header'>\n"; echo " <div id='pageheadcontainer'>\n"; echo " <div id='pagehead'><img style='float:left' src='images/popper_head_mycv.gif' alt='UNL myCV' />\n<div style='padding:5px;float:right;' class='".$GLOBALS['textStyle']."'><a href='http://ucommxsrv1.unl.edu/mycv/cvViewer.php?uid=".$_SESSION['Login']."'>View</a> <a href='auth/logout.php'>Logout</a></div></div>\n"; echo " </div>\n"; echo " <div id='logo'>\n"; echo " <a href='http://www.unl.edu' target='_blank'><img alt='N Icon' src='http://www.unl.edu/unlpub/graphics/n_redsquare.gif' width='37' height='29' /></a>\n"; echo " </div>\n"; echo "</div>\n"; echo "<div id='middle'>\n"; echo " <div id='contentContainer'>\n"; echo " <div id='content'>\n"; if($this->displayForm == true) { echo "<form action='save.php' id='$this->heading' method='POST'>\n"; echo "<div style='float:right;padding:5px;'>"; if($this->displaySaveButton==true) echo "<input id='submit' name='submit' type='submit' value='Save' />"; if($this->displayCancelButton==true) echo "<input id='cancelButton' name='cancelButton' type='submit' value='Cancel' />"; if($this->displayAddButton==true) echo "<input id='addButton' name='addButton' type='submit' value='Add' />"; if($this->displayDeleteButton==true) echo "<input id='deleteButton' name='deleteButton' type='submit' value='Delete' />"; echo "</div>\n"; } echo "<div id='cvSections' class='zenboxfeature'>\n"; for($i=0;$i<count($this->cvSections);$i++) { if(method_exists($this->cvSections[$i],"display")) { $this->cvSections[$i]->display(); } else echo "<span class='".$GLOBALS['textStyle']."'>".$this->cvSections[$i]."</span>"; } echo "</div>\n"; if($this->displayForm == true) { echo "</form>\n"; } echo " </div>\n"; echo " </div>\n"; echo " <div id='links'>\n"; require("sidebar.php"); echo " </div>\n"; echo "</div>\n"; echo "<div id='footer' class='footer'>\n"; echo " © 2004 University of Nebraska–Lincoln\n"; echo "</div>\n"; echo "</body>\n"; echo "</html>\n"; } } /* cvSection contains a heading for a section, and an array of fields (cvField objects). */ class cvSection { var $heading; // string heading for this section, uses $GLOBALS['headerStyle'] var $cvFields = array(); // array of cvField objects function cvSection($heading) { $this->heading = $heading; } function display(){ echo "<div class='cvSection'>"; echo "<div class='cvSectionHeading'><span class='".$GLOBALS['headerStyle']."'>".$this->heading."</span></div>"; for ($i=0;$i<sizeof($this->cvFields);$i++) { $this->cvFields[$i]->display(); } echo "</div>\n"; } } /* The cvTableField, is used as an HTML table of data. Data that could be form fields, or simply text. */ class cvTableField { var $heading; //heading for the table (does not display) var $cells; //2 dimensional array of cells. function cvTableField($heading,$cells) { $this->heading = $heading; $this->cells = $cells; } function display() { $cols = sizeof($this->cells[0]); echo "<table class='cvTableField'>\n"; for($i=0;$i<sizeof($this->cells);$i++) { // Use subheadStyle if this is the first row, otherwise textStyle if($i==0) $textstyle = $GLOBALS['subheadStyle']; else $textstyle = $GLOBALS['textStyle']; echo "<tr>\n"; if(sizeof($this->cells[$i])==1) { echo "<td colspan='".$cols."'>"; if(method_exists($this->cells[$i][0],"display")) $this->cells[$i][0]->display(); else echo "<span class='".$textstyle."'>".$this->cells[$i][0]."</span>"; echo "</td>"; } else for($j=0;$j<sizeof($this->cells[$i]);$j++) { echo "<td>\n"; if(method_exists($this->cells[$i][$j],"display")) $this->cells[$i][$j]->display(); else echo "<span class='".$textstyle."'>".$this->cells[$i][$j]."</span>"; echo "</td>\n"; } echo "</tr>\n"; } echo "</table>\n"; } } /* cvField object is basically a line in a section, a grouping of (possibly multiple) HTML form fields, and the label associated with these. */ class cvField { var $heading; //heading for this field var $cssClass; //css class for the heading portion, defaults to textStyle var $inputObjects = array(); //array of form input objects related to this field function cvField($heading,$inputObjects) { $this->heading = $heading; $this->inputObjects = $inputObjects; $this->cssClass = "cvFieldHeading"; //$GLOBALS['textStyle']; } function display() { echo "<div class='cvField'>"; //Check to see if headng is null if($this->heading.'' != '') { echo("<div class='$this->cssClass'><span class='".$GLOBALS['textStyle']."'>".$this->heading." : </span></div><div class='formInputObjects'>"); } for($i=0;$i<sizeof($this->inputObjects);$i++) { if(method_exists($this->inputObjects[$i],"display")) $this->inputObjects[$i]->display(); else echo "<span class='".$GLOBALS['textStyle']."'>".$this->inputObjects[$i]."</span>"; } if($this->heading.'' != '') { echo("</div>"); } echo "</div>\n"; } } /* formInputObject is literally an HTML form element, and a (optional) label for it. Form fields can be of any standard HTML <input> type. */ class formInputObject { var $type; //text, textarea, password, radio, checkbox etc. var $id; //DOM ID and Name associated with this form element var $cssClass; //cascading style sheet class for this element var $length; //length of the element (in characters) var $defaultValue; //default value var $label; //can hold a label for this field that will appear to the left of the field. var $height; //number of height in ems or rows of text... mainly for textarea boxes. function formInputObject($id,$type="text",$defaultValue='',$length=20,$height=2) { $this->id = $id; $this->type=$type; $this->length=$length; $this->defaultValue=$defaultValue; $this->cssClass=$GLOBALS['formFieldStyle']; $this->label=""; $this->height=$height; } function display() { if($this->label != "") echo "<span class='".$GLOBALS['textStyle']."'>".$this->label." </span>"; switch ($this->type){ case "text": case "password": case "hidden": case "button": case "submit": case "checkbox": echo "<input type='$this->type' id='$this->id' name='$this->id' class='$this->cssClass' length='$this->length' value='$this->defaultValue' />"; break; case "textarea": echo "<textarea id='$this->id' name='$this->id' class='$this->cssClass' rows='$this->height' cols='$this->length'>$this->defaultValue</textarea>"; break; case "radio": //radio is handled slightly different than the other input types because radio inputs have the same name. //so no DOM ID is output for radio inputs echo "<input type='$this->type' name='$this->id' value='$this->label' class='$this->cssClass' "; if($this->defaultValue==$this->label) echo "checked='checked' "; echo "/>"; break; default: echo("Error, formInputObject has no valid type!"); //error break; } } } /* formOptionObject is literally a HTML <select> element with array of options. */ class formOptionObject { var $id; //DOM ID and Name associated with this form element var $options; //associative array with the options for this drop down ['selected'] (bool) ['value'],['label'] (strings) var $cssClass; //defaults to formFieldStyle var $jumpMenu; //bool value to determine if this <select> object is a JUMP menu (javascript onchange goes to value). function formOptionObject($id,$options) { $this->id = $id; $this->options = $options; $this->cssClass=$GLOBALS['formFieldStyle']; $this->jumpMenu = false; } function display() { echo "<select id='$this->id' name='$this->id' class='$this->cssClass' "; if($this->jumpMenu) echo "onchange=\"MM_jumpMenu('parent',this,0)\" "; echo ">\n"; for($i=0;$i<sizeof($this->options);$i++) { echo "<option "; if($this->options[$i]['selected']==true) echo "selected='selected' "; echo "value='".$this->options[$i]['value']."'>".$this->options[$i]['label']."</option>\n"; } echo "</select>\n"; } } ?> \ No newline at end of file +<?php /* These Set default css class styles for cv elements */ $GLOBALS['textStyle'] = "sseriftext"; $GLOBALS['headerStyle'] = "sserifstoryhead"; $GLOBALS['subheadStyle'] = "sserifstoryheadsmall"; $GLOBALS['formFieldStyle'] = "menu"; /* The cvPage class defines an HTML page for the cv system. The cvPage object holds sections (array of cvSection objects) of cv data. */ class cvPage { var $heading; //heading for the page (not currently displayed) var $cvSections; //array of sections (cvSection objects) in this page var $displayForm; //bool value, if true form and save button are displayed (DEFAULT TRUE) var $displaySaveButton; //bool value, if true 'save button' is displayed (DEFAULT TRUE) var $displayDeleteButton; //bool value, if true 'delete button' is displayed (DEFAULT FALSE) var $displayCancelButton; //bool value, if true 'cancel button' is displayed (DEFAULT FALSE) var $displayAddButton; //bool value, if true 'add button' is displayed (DEFAULT FALSE) function cvPage($heading,$cvSections) { $this->heading = $heading; $this->cvSections = $cvSections; $this->displayForm = true; $this->displaySaveButton = true; $this->displayDeleteButton = false; $this->displayAddButton = false; $this->displayCancelButton = false; } function display() { echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'; echo '<html xmlns="http://www.w3.org/1999/xhtml">'; echo "\n<head>\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />'; echo "\n<title>".$this->heading."</title>\n"; echo "<link rel='stylesheet' href='popup_layout.css' type='text/css' />\n"; require("/Library/WebServer/Documents/unlpub/2004sharedcode/2004includes/2004cssselector/cssselect.php"); echo "<script type='text/javascript'>function MM_jumpMenu(targ,selObj,restore){ //v3.0\n". "eval(targ+\".location='".$_SERVER['PHP_SELF']."?id="."\"+selObj.options[selObj.selectedIndex].value+\"'\");\n". "if (restore) selObj.selectedIndex=0;\n". "}\n"; if(@$_SESSION['error']."" != "") { echo "alert('".addslashes($_SESSION['error'])."');\n"; $_SESSION['error'] = ""; } echo "</script>\n"; echo "</head>\n"; echo "<body>\n"; echo "<div id='header'>\n"; echo " <div id='pageheadcontainer'>\n"; echo " <div id='pagehead'><img style='float:left' src='images/popper_head_mycv.gif' alt='UNL myCV' />\n<div style='padding:5px;float:right;' class='".$GLOBALS['textStyle']."'><a href='http://ucommxsrv1.unl.edu/mycv/cvViewer.php?uid=".$_SESSION['Login']."'>View</a> <a href='auth/logout.php'>Logout</a></div></div>\n"; echo " </div>\n"; echo " <div id='logo'>\n"; echo " <a href='http://www.unl.edu' target='_blank'><img alt='N Icon' src='http://www.unl.edu/unlpub/graphics/n_redsquare.gif' width='37' height='29' /></a>\n"; echo " </div>\n"; echo "</div>\n"; echo "<div id='middle'>\n"; echo " <div id='contentContainer'>\n"; echo " <div id='content'>\n"; if($this->displayForm == true) { echo "<form action='save.php' id='$this->heading' method='POST'>\n"; echo "<div style='float:right;padding:5px;'>"; if($this->displaySaveButton==true) echo "<input id='submit' name='submit' type='submit' value='Save' />"; if($this->displayCancelButton==true) echo "<input id='cancelButton' name='cancelButton' type='submit' value='Cancel' />"; if($this->displayAddButton==true) echo "<input id='addButton' name='addButton' type='submit' value='Add' />"; if($this->displayDeleteButton==true) echo "<input id='deleteButton' name='deleteButton' type='submit' value='Delete' />"; echo "</div>\n"; } echo "<div id='cvSections' class='zenboxfeature'>\n"; for($i=0;$i<count($this->cvSections);$i++) { if(method_exists($this->cvSections[$i],"display")) { $this->cvSections[$i]->display(); } else echo "<span class='".$GLOBALS['textStyle']."'>".$this->cvSections[$i]."</span>"; } echo "</div>\n"; if($this->displayForm == true) { echo "</form>\n"; } echo " </div>\n"; echo " </div>\n"; echo " <div id='links'>\n"; require("sidebar.php"); echo " </div>\n"; echo "</div>\n"; echo "<div id='footer' class='footer'>\n"; echo " © 2004 University of Nebraska–Lincoln\n"; echo "</div>\n"; echo "</body>\n"; echo "</html>\n"; } } /* cvSection contains a heading for a section, and an array of fields (cvField objects). */ class cvSection { var $heading; // string heading for this section, uses $GLOBALS['headerStyle'] var $cvFields = array(); // array of cvField objects function cvSection($heading) { $this->heading = $heading; } function display(){ echo "<div class='cvSection'>"; echo "<div class='cvSectionHeading'><span class='".$GLOBALS['headerStyle']."'>".$this->heading."</span></div>"; for ($i=0;$i<sizeof($this->cvFields);$i++) { $this->cvFields[$i]->display(); } echo "</div>\n"; } } /* The cvTableField, is used as an HTML table of data. Data that could be form fields, or simply text. */ class cvTableField { var $heading; //heading for the table (does not display) var $cells; //2 dimensional array of cells. function cvTableField($heading,$cells) { $this->heading = $heading; $this->cells = $cells; } function display() { $cols = sizeof($this->cells[0]); echo "<table class='cvTableField'>\n"; for($i=0;$i<sizeof($this->cells);$i++) { // Use subheadStyle if this is the first row, otherwise textStyle if($i==0) $textstyle = $GLOBALS['subheadStyle']; else $textstyle = $GLOBALS['textStyle']; echo "<tr>\n"; if(sizeof($this->cells[$i])==1) { echo "<td colspan='".$cols."'>"; if(method_exists($this->cells[$i][0],"display")) $this->cells[$i][0]->display(); else echo "<span class='".$textstyle."'>".$this->cells[$i][0]."</span>"; echo "</td>"; } else for($j=0;$j<sizeof($this->cells[$i]);$j++) { echo "<td>\n"; if(method_exists($this->cells[$i][$j],"display")) $this->cells[$i][$j]->display(); else echo "<span class='".$textstyle."'>".$this->cells[$i][$j]."</span>"; echo "</td>\n"; } echo "</tr>\n"; } echo "</table>\n"; } } /* cvField object is basically a line in a section, a grouping of (possibly multiple) HTML form fields, and the label associated with these. */ class cvField { var $heading; //heading for this field var $cssClass; //css class for the heading portion, defaults to textStyle var $inputObjects = array(); //array of form input objects related to this field function cvField($heading,$inputObjects) { $this->heading = $heading; $this->inputObjects = $inputObjects; $this->cssClass = "cvFieldHeading"; //$GLOBALS['textStyle']; } function display() { echo "<div class='cvField'>"; //Check to see if headng is null if($this->heading.'' != '') { echo("<div class='$this->cssClass'><span class='".$GLOBALS['textStyle']."'>".$this->heading." : </span></div><div class='formInputObjects'>"); } for($i=0;$i<sizeof($this->inputObjects);$i++) { if(method_exists($this->inputObjects[$i],"display")) $this->inputObjects[$i]->display(); else echo "<span class='".$GLOBALS['textStyle']."'>".$this->inputObjects[$i]."</span>"; } if($this->heading.'' != '') { echo("</div>"); } echo "</div>\n"; } } /* formInputObject is literally an HTML form element, and a (optional) label for it. Form fields can be of any standard HTML <input> type. */ class formInputObject { var $type; //text, textarea, password, radio, checkbox etc. var $id; //DOM ID and Name associated with this form element var $cssClass; //cascading style sheet class for this element var $length; //length of the element (in characters) var $defaultValue; //default value var $label; //can hold a label for this field that will appear to the left of the field. var $height; //number of height in ems or rows of text... mainly for textarea boxes. function formInputObject($id,$type="text",$defaultValue='',$length=20,$height=2) { $this->id = $id; $this->type=$type; $this->length=$length; $this->defaultValue=$defaultValue; $this->cssClass=$GLOBALS['formFieldStyle']; $this->label=""; $this->height=$height; } function display() { if($this->label != "") echo "<span class='".$GLOBALS['textStyle']."'>".$this->label." </span>"; switch ($this->type){ case "text": case "password": case "hidden": case "button": case "submit": case "checkbox": echo "<input type='$this->type' id='$this->id' name='$this->id' class='$this->cssClass' length='$this->length' value='$this->defaultValue' />"; break; case "textarea": echo "<textarea id='$this->id' name='$this->id' class='$this->cssClass' rows='$this->height' cols='$this->length'>$this->defaultValue</textarea>"; break; case "radio": //radio is handled slightly different than the other input types because radio inputs have the same name. //so no DOM ID is output for radio inputs echo "<input type='$this->type' name='$this->id' value='$this->label' class='$this->cssClass' "; if($this->defaultValue==$this->label) echo "checked='checked' "; echo "/>"; break; default: echo("Error, formInputObject has no valid type!"); //error break; } } } /* formOptionObject is literally a HTML <select> element with array of options. */ class formOptionObject { var $id; //DOM ID and Name associated with this form element var $options; //associative array with the options for this drop down ['selected'] (bool) ['value'],['label'] (strings) var $cssClass; //defaults to formFieldStyle var $jumpMenu; //bool value to determine if this <select> object is a JUMP menu (javascript onchange goes to value). function formOptionObject($id,$options) { $this->id = $id; $this->options = $options; $this->cssClass=$GLOBALS['formFieldStyle']; $this->jumpMenu = false; } function display() { echo "<select id='$this->id' name='$this->id' class='$this->cssClass' "; if($this->jumpMenu) echo "onchange=\"MM_jumpMenu('parent',this,0)\" "; echo ">\n"; for($i=0;$i<sizeof($this->options);$i++) { echo "<option "; if($this->options[$i]['selected']==true) echo "selected='selected' "; echo "value='".$this->options[$i]['value']."'>".$this->options[$i]['label']."</option>\n"; } echo "</select>\n"; } } ?> \ No newline at end of file diff --git a/cv.functions.htmlResume.php b/cv.functions.htmlResume.php index 4dd91e16307339ee790daddd4ac25ac22eee5d17..08ea0cf8716a2494120e1044a0d5604b468d5187 100644 --- a/cv.functions.htmlResume.php +++ b/cv.functions.htmlResume.php @@ -1 +1 @@ -<? function htmlResume($uid) { $sql = "SELECT ". "CONCAT(person.FirstName,' ',person.LastName) AS formattedname, ". "person.Phone AS telephone, ". "person.Fax AS fax, ". "person.Email AS email, ". "objective.Description AS objective, ". "summary.Description AS summary ". "FROM person, summary, resume, usr, objective ". "WHERE ". "usr.PersonId = person.PersonId AND ". "resume.UserId = usr.UserId AND ". "objective.ResumeId = resume.ResumeId AND ". "summary.ResumeId = resume.ResumeId AND ". "summary.SummaryType = 'S' AND ". "person.LDAPUID = '".$_GET['uid']."'"; $result = mysql_query($sql); echo mysql_error(); $resume = mysql_fetch_assoc($result); ?> <div id="Resume"> <div id="ResumeId"> <div id="IdValue">JA2284</div> </div> <div id="DistributionGuidelines"> <div class="DoNotDistributeTo"> <div class="Name">Wilson Research Laboratories</div> </div> </div> <div id="StructuredXMLResume"> <div id="ContactInfo"> <div id="PersonName"> <div class="FormattedName">John A. Example</div> </div> <div id="ContactMethod"> <div class="Telephone"> <div class="FormattedNumber">+1 404 122 1234</div> </div> <div class="Fax"> <div class="FormattedNumber">+1 404 122 1234</div> </div> <div class="PostalAddress"> <div class="CountryCode">US</div> <div class="PostalCode">12345-1234</div> <div class="Region">GA</div> <div class="Municipality">Atlanta</div> <div class="Recipient"> <div class="OrganizationName">College of Computing, Georgia Institute of Technology</div> </div> </div> </div> </div> <div id="ExecutiveSummary">Summary of employment and education history, publications, speaking engagements, and other acheivements during my career.</div> <div id="Objective">To find opportunity which best fits my skills and experience.</div> <div id="EmploymentHistory"> <div class="EmployerOrg"> <div class="EmployerOrgName">IBM</div> <div class="EmployerContactInfo"> <div class="LocationSummary"> <div class="Municipality">Yorktown Heights</div> <div class="Region">NY</div> </div> </div> <div class="PositionHistory" positionType="internship"> <div class="Title" /> <div class="OrgName"> <div class="OrganizationName">T.J. Watson Research Center</div> </div> <div class="Description">Designed and prototyped extensions to Babble, a distributed workgroup support system developed at IBM Research. Babble allows members of a workgroup to stay in contact through semi-synchronous textual discussion (both public and private) and variety of awareness aids. Performed an in-depth analysis of the system as it currently exists and created a number of design sketches, prototypes, and working versions of an improved Babble that supports much richer interaction. Two patents are pending on this work. </div> <div class="StartDate"> <div class="YearMonth">1998-06</div> </div> <div class="EndDate"> <div class="YearMonth">1998-08</div> </div> </div> </div> </div> <div id="EducationHistory"> <div class="SchoolOrInstitution" schoolType="trade"> <div class="School"> <div class="InternetDomainName">www.gatech.edu</div> <div class="SchoolName">Georgia Institute of Technology</div> </div> <div class="Degree" degreeType="doctorate"> <div class="DegreeName">Ph.D.</div> <div class="DegreeDate"> <div class="YearMonth">2002-12</div> </div> <div class="DegreeMajor"> <div class="Name">Computer Science</div> </div> <div class="DegreeMinor"> <div class="Name">History, Technology, and Society</div> </div> <div class="Comments">Dissertation advisor: Amy Breck</div> </div> </div> </div> <div id="LicensesAndCertifications"> <div class="LicenseOrCertification"> <div class="Name">Microsoft Certified Systems Engineer</div> <div class="Id" /> <div class="IssuingAuthority">Microsoft</div> <div class="Description">Analyze business requirements to design and implement an infrastructure solution based on the Windows platform and Microsoft Servers software.</div> <div class="EffectiveDate"> <div class="ValidFrom"> <div class="AnyDate">2002-01-01</div> </div> <div class="ValidTo"> <div class="AnyDate">2003-01-01</div> </div> </div> </div> </div> <div id="PatentHistory"> <div class="Patent"> <div class="PatentTitle">Method for Translucent Online Interaction</div> <div class="Description" /> <div class="Inventors"> <div class="InventorName">Rachel R. Bell</div> <div class="InventorName">John A. Example</div> </div> <div class="PatentDetail"> <div class="PatentMilestone"> <div class="Status">PatentPending</div> <div class="Date">2000-09-12</div> </div> </div> </div> </div> <div id="PublicationHistory"> <div class="Article"> <div class="Title">Designing Interfaces for Youth Services Information Management.</div> <div class="Name" role="author"> <div class="FormattedName">John A. Example</div> </div> <div class="PublicationDate"> <div class="YearMonth">1996-06</div> </div> <div class="JournalOrSerialName">1996 Human-Computer Interaction Laboratory Video Reports, K. Pleasant, Ed., </div> <div class="Volume">vol. 2</div> <div class="Issue">no. 3</div> <div class="PageNumber">pp.319-329</div> <div class="PublicationLanguage">EN</div> </div> <div class="Book"> <div class="Title">XML in a Seashell</div> <div class="Name" role="author"> <div class="FormattedName">John A. Example</div> </div> <div class="PublicationDate"> <div class="YearMonth">2001-02</div> </div> <div class="Abstract">A very readable introduction to XML for readers with existing knowledge of markup and Web technologies. </div> <div class="Copyright"> <div class="CopyrightDates"> <div class="OriginalDate"> <div class="Year">2001</div> </div> </div> <div class="CopyrightText">Copyright 2nd edition</div> </div> <div class="Edition">2nd Edition</div> <div class="ISBN">0596000222</div> <div class="PublisherName">O'Malley Associates</div> <div class="PublisherLocation"> Garden City, NY, US </div> </div> <div class="ConferencePaper"> <div class="Title">Trends in Employee Benefit Offerings</div> <div class="Name" role="author"> <div class="FormattedName">Debra J. Cohen</div> </div> <div class="EventName">SHRM 55th Annual Conference and Exposition</div> <div class="ConferenceDate"> <div class="AnyDate">2003-06-10</div> </div> <div class="ConferenceLocation">Orlando, FL</div> </div> <div class="OtherPublication" type="x:Software"> <div class="Title">UCLA Tree-Repeater-Interconnect-Optimization (TRIO) Package</div> <div class="Name" role="x:developer"> <div class="FormattedName">John A. Example</div> </div> <div class="PublicationDate"> <div class="Year">2002</div> </div> <div class="Link">http://ballade.cs.ucla.edu/~cong/slides/vlsi99.pdf</div> </div> </div> <div id="SpeakingEventsHistory"> <div class="SpeakingEvent" type="x:reviewer"> <div class="StartDate"> <div class="Year">1997</div> </div> <div class="EventName">ACM/IEEE Design Automation Conference (DAC)</div> <div class="EventType">conference</div> <div class="Link">http://www.ACMDAC.com</div> </div> </div> <div id="Qualifications"> <div class="Competency" name="Communication Skills"> <div class="Competency" name="Written Communication Skills"> <div class="CompetencyEvidence" name="WRITTENTEST1-A" dateOfIncident="1995-01-01" lastUsed="2000-01-01"> <div class="NumericValue" minValue="3" maxValue="5" description="SEP-equivalent Skill-Level Range">5</div> </div> <div class="CompetencyWeight"> <div class="NumericValue" minValue="0" maxValue="100">35</div> </div> </div> </div> </div> <div id="Languages"> <div class="Language"> <div class="LanguageCode">EN</div> <div class="Read">true</div> <div class="Write">true</div> <div class="Speak">true</div> </div> </div> <div id="Achievements"> <div class="Achievement"> <div class="Date"> <div class="StringDate">2001-2002</div> </div> <div class="Description">Intel Foundation Graduate Fellowship</div> </div> </div> <div id="Associations"> <div class="Association" type="Professional"> <div class="Name">HR-XML Consortium</div> <div class="Link">www.hr-xml.org</div> <div class="StartDate"> <div class="YearMonth">2000-01</div> </div> <div class="Role"> <div class="Name">Recruiting and Staffing Project Lead</div> <div class="Deliverable">Resume 2.0 Specification</div> <div class="StartDate"> <div class="YearMonth">2002-03</div> </div> <div class="EndDate"> <div class="YearMonth">2003-07</div> </div> </div> <div class="Comments">Membership through current employer.</div> </div> </div> <div id="References"> <div class="Reference" type="Professional"> <div class="PersonName"> <div class="FormattedName">Dr. Amy R. Breck</div> </div> <div class="PositionTitle">Advisor</div> <div class="ContactMethod"> <div class="Telephone"> <div class="FormattedNumber">1 404 1224567</div> </div> <div class="InternetEmailAddress">arbreck@cc.gatech.edu</div> </div> <div class="Comments">College of Computing, Georgia Institute of Technology</div> </div> </div> <div id="SecurityCredentials"> <div class="SecurityCredential"> <div class="Name">Top Secret Security Clearance (Active)</div> <div class="IssuingAuthority">Department of Defence</div> <div class="Description">Currently holding a top secret security clearance for my previous job with in the Central Intelligence Agency</div> <div class="EffectiveDate"> <div class="ValidFrom"> <div class="StringDate">4/1/1997</div> </div> <div class="ValidTo"> <div class="StringDate">4/1/2003</div> </div> <div class="FirstIssuedDate"> <div class="StringDate">4/1/1997</div> </div> </div> </div> </div> <div id="ResumeAdditionalItems"> <div class="ResumeAdditionalItem" type="Hobbies"> <div class="EffectiveDate"> <div class="StartDate"> <div class="Year">2000</div> </div> </div> <div class="Description">Rock Climbing</div> </div> </div> <div id="RevisionDate">2003-03-13</div> </div> </div> <span style="border-bottom:1px solid #CC0000;" class="sserifstoryhead"><? echo $resume['formattedname']; ?></span><br /> <p class="sseriftext"><? echo $resume['telephone']; ?><br /></p> <p class="sseriftext"><span style="font-size:1.5em;"class="sserifstoryhead">Objective: </span><br /><? echo $resume['objective']; ?></p> <p class="sseriftext"><span style="font-size:1.5em;" class="sserifstoryhead">Summary: </span><br /><? echo $resume['summary']; ?></p> <? } ?> \ No newline at end of file +<?php function htmlResume($uid) { $sql = "SELECT ". "CONCAT(person.FirstName,' ',person.LastName) AS formattedname, ". "person.Phone AS telephone, ". "person.Fax AS fax, ". "person.Email AS email, ". "objective.Description AS objective, ". "summary.Description AS summary ". "FROM person, summary, resume, usr, objective ". "WHERE ". "usr.PersonId = person.PersonId AND ". "resume.UserId = usr.UserId AND ". "objective.ResumeId = resume.ResumeId AND ". "summary.ResumeId = resume.ResumeId AND ". "summary.SummaryType = 'S' AND ". "person.LDAPUID = '".$_GET['uid']."'"; $result = mysql_query($sql); echo mysql_error(); $resume = mysql_fetch_assoc($result); ?> <div id="Resume"> <div id="ResumeId"> <div id="IdValue">JA2284</div> </div> <div id="DistributionGuidelines"> <div class="DoNotDistributeTo"> <div class="Name">Wilson Research Laboratories</div> </div> </div> <div id="StructuredXMLResume"> <div id="ContactInfo"> <div id="PersonName"> <div class="FormattedName">John A. Example</div> </div> <div id="ContactMethod"> <div class="Telephone"> <div class="FormattedNumber">+1 404 122 1234</div> </div> <div class="Fax"> <div class="FormattedNumber">+1 404 122 1234</div> </div> <div class="PostalAddress"> <div class="CountryCode">US</div> <div class="PostalCode">12345-1234</div> <div class="Region">GA</div> <div class="Municipality">Atlanta</div> <div class="Recipient"> <div class="OrganizationName">College of Computing, Georgia Institute of Technology</div> </div> </div> </div> </div> <div id="ExecutiveSummary">Summary of employment and education history, publications, speaking engagements, and other acheivements during my career.</div> <div id="Objective">To find opportunity which best fits my skills and experience.</div> <div id="EmploymentHistory"> <div class="EmployerOrg"> <div class="EmployerOrgName">IBM</div> <div class="EmployerContactInfo"> <div class="LocationSummary"> <div class="Municipality">Yorktown Heights</div> <div class="Region">NY</div> </div> </div> <div class="PositionHistory" positionType="internship"> <div class="Title" /> <div class="OrgName"> <div class="OrganizationName">T.J. Watson Research Center</div> </div> <div class="Description">Designed and prototyped extensions to Babble, a distributed workgroup support system developed at IBM Research. Babble allows members of a workgroup to stay in contact through semi-synchronous textual discussion (both public and private) and variety of awareness aids. Performed an in-depth analysis of the system as it currently exists and created a number of design sketches, prototypes, and working versions of an improved Babble that supports much richer interaction. Two patents are pending on this work. </div> <div class="StartDate"> <div class="YearMonth">1998-06</div> </div> <div class="EndDate"> <div class="YearMonth">1998-08</div> </div> </div> </div> </div> <div id="EducationHistory"> <div class="SchoolOrInstitution" schoolType="trade"> <div class="School"> <div class="InternetDomainName">www.gatech.edu</div> <div class="SchoolName">Georgia Institute of Technology</div> </div> <div class="Degree" degreeType="doctorate"> <div class="DegreeName">Ph.D.</div> <div class="DegreeDate"> <div class="YearMonth">2002-12</div> </div> <div class="DegreeMajor"> <div class="Name">Computer Science</div> </div> <div class="DegreeMinor"> <div class="Name">History, Technology, and Society</div> </div> <div class="Comments">Dissertation advisor: Amy Breck</div> </div> </div> </div> <div id="LicensesAndCertifications"> <div class="LicenseOrCertification"> <div class="Name">Microsoft Certified Systems Engineer</div> <div class="Id" /> <div class="IssuingAuthority">Microsoft</div> <div class="Description">Analyze business requirements to design and implement an infrastructure solution based on the Windows platform and Microsoft Servers software.</div> <div class="EffectiveDate"> <div class="ValidFrom"> <div class="AnyDate">2002-01-01</div> </div> <div class="ValidTo"> <div class="AnyDate">2003-01-01</div> </div> </div> </div> </div> <div id="PatentHistory"> <div class="Patent"> <div class="PatentTitle">Method for Translucent Online Interaction</div> <div class="Description" /> <div class="Inventors"> <div class="InventorName">Rachel R. Bell</div> <div class="InventorName">John A. Example</div> </div> <div class="PatentDetail"> <div class="PatentMilestone"> <div class="Status">PatentPending</div> <div class="Date">2000-09-12</div> </div> </div> </div> </div> <div id="PublicationHistory"> <div class="Article"> <div class="Title">Designing Interfaces for Youth Services Information Management.</div> <div class="Name" role="author"> <div class="FormattedName">John A. Example</div> </div> <div class="PublicationDate"> <div class="YearMonth">1996-06</div> </div> <div class="JournalOrSerialName">1996 Human-Computer Interaction Laboratory Video Reports, K. Pleasant, Ed., </div> <div class="Volume">vol. 2</div> <div class="Issue">no. 3</div> <div class="PageNumber">pp.319-329</div> <div class="PublicationLanguage">EN</div> </div> <div class="Book"> <div class="Title">XML in a Seashell</div> <div class="Name" role="author"> <div class="FormattedName">John A. Example</div> </div> <div class="PublicationDate"> <div class="YearMonth">2001-02</div> </div> <div class="Abstract">A very readable introduction to XML for readers with existing knowledge of markup and Web technologies. </div> <div class="Copyright"> <div class="CopyrightDates"> <div class="OriginalDate"> <div class="Year">2001</div> </div> </div> <div class="CopyrightText">Copyright 2nd edition</div> </div> <div class="Edition">2nd Edition</div> <div class="ISBN">0596000222</div> <div class="PublisherName">O'Malley Associates</div> <div class="PublisherLocation"> Garden City, NY, US </div> </div> <div class="ConferencePaper"> <div class="Title">Trends in Employee Benefit Offerings</div> <div class="Name" role="author"> <div class="FormattedName">Debra J. Cohen</div> </div> <div class="EventName">SHRM 55th Annual Conference and Exposition</div> <div class="ConferenceDate"> <div class="AnyDate">2003-06-10</div> </div> <div class="ConferenceLocation">Orlando, FL</div> </div> <div class="OtherPublication" type="x:Software"> <div class="Title">UCLA Tree-Repeater-Interconnect-Optimization (TRIO) Package</div> <div class="Name" role="x:developer"> <div class="FormattedName">John A. Example</div> </div> <div class="PublicationDate"> <div class="Year">2002</div> </div> <div class="Link">http://ballade.cs.ucla.edu/~cong/slides/vlsi99.pdf</div> </div> </div> <div id="SpeakingEventsHistory"> <div class="SpeakingEvent" type="x:reviewer"> <div class="StartDate"> <div class="Year">1997</div> </div> <div class="EventName">ACM/IEEE Design Automation Conference (DAC)</div> <div class="EventType">conference</div> <div class="Link">http://www.ACMDAC.com</div> </div> </div> <div id="Qualifications"> <div class="Competency" name="Communication Skills"> <div class="Competency" name="Written Communication Skills"> <div class="CompetencyEvidence" name="WRITTENTEST1-A" dateOfIncident="1995-01-01" lastUsed="2000-01-01"> <div class="NumericValue" minValue="3" maxValue="5" description="SEP-equivalent Skill-Level Range">5</div> </div> <div class="CompetencyWeight"> <div class="NumericValue" minValue="0" maxValue="100">35</div> </div> </div> </div> </div> <div id="Languages"> <div class="Language"> <div class="LanguageCode">EN</div> <div class="Read">true</div> <div class="Write">true</div> <div class="Speak">true</div> </div> </div> <div id="Achievements"> <div class="Achievement"> <div class="Date"> <div class="StringDate">2001-2002</div> </div> <div class="Description">Intel Foundation Graduate Fellowship</div> </div> </div> <div id="Associations"> <div class="Association" type="Professional"> <div class="Name">HR-XML Consortium</div> <div class="Link">www.hr-xml.org</div> <div class="StartDate"> <div class="YearMonth">2000-01</div> </div> <div class="Role"> <div class="Name">Recruiting and Staffing Project Lead</div> <div class="Deliverable">Resume 2.0 Specification</div> <div class="StartDate"> <div class="YearMonth">2002-03</div> </div> <div class="EndDate"> <div class="YearMonth">2003-07</div> </div> </div> <div class="Comments">Membership through current employer.</div> </div> </div> <div id="References"> <div class="Reference" type="Professional"> <div class="PersonName"> <div class="FormattedName">Dr. Amy R. Breck</div> </div> <div class="PositionTitle">Advisor</div> <div class="ContactMethod"> <div class="Telephone"> <div class="FormattedNumber">1 404 1224567</div> </div> <div class="InternetEmailAddress">arbreck@cc.gatech.edu</div> </div> <div class="Comments">College of Computing, Georgia Institute of Technology</div> </div> </div> <div id="SecurityCredentials"> <div class="SecurityCredential"> <div class="Name">Top Secret Security Clearance (Active)</div> <div class="IssuingAuthority">Department of Defence</div> <div class="Description">Currently holding a top secret security clearance for my previous job with in the Central Intelligence Agency</div> <div class="EffectiveDate"> <div class="ValidFrom"> <div class="StringDate">4/1/1997</div> </div> <div class="ValidTo"> <div class="StringDate">4/1/2003</div> </div> <div class="FirstIssuedDate"> <div class="StringDate">4/1/1997</div> </div> </div> </div> </div> <div id="ResumeAdditionalItems"> <div class="ResumeAdditionalItem" type="Hobbies"> <div class="EffectiveDate"> <div class="StartDate"> <div class="Year">2000</div> </div> </div> <div class="Description">Rock Climbing</div> </div> </div> <div id="RevisionDate">2003-03-13</div> </div> </div> <span style="border-bottom:1px solid #CC0000;" class="sserifstoryhead"><?php echo $resume['formattedname']; ?></span><br /> <p class="sseriftext"><?php echo $resume['telephone']; ?><br /></p> <p class="sseriftext"><span style="font-size:1.5em;"class="sserifstoryhead">Objective: </span><br /><?php echo $resume['objective']; ?></p> <p class="sseriftext"><span style="font-size:1.5em;" class="sserifstoryhead">Summary: </span><br /><?php echo $resume['summary']; ?></p> <?php } ?> \ No newline at end of file diff --git a/cv.functions.php b/cv.functions.php index e02eb73ec6c5bb11cd6f063bff00fbcca28e9af2..060b8134b2e7485a60519d275ffdc9f62ca5c8a1 100644 --- a/cv.functions.php +++ b/cv.functions.php @@ -1 +1 @@ -<? /* optionGenerator, performs an SQL query, and returns an associative array of label, value, and selected (bool) values. Input: $table = table to retrieve info from. $labelField = field in $table to use as the value for the ['label'] $valueField = field in $table to use as the value for the ['value'] $orderByField = field in $table to use as the SQL ORDER BY clause $selectedIndex = $valueField value if equal to the ['value'], set ['selected'] = true, otherwise false $blankEntry = bool value to indicate if a blank entry will be added to this array of elements. $whereClause = SQL WHERE clause, for example "WHERE field = 'value'" */ function optionGenerator($table,$labelField,$valueField,$orderByField,$selectedIndex,$blankEntry=true,$whereClause = "") { $option = array(); if($blankEntry==true) { $option[0]['label']=''; $option[0]['value']=''; if(!isset($selectedIndex) || $selectedIndex == '') $option[0]['selected'] = true; else $option[0]['selected'] = false; } $sql = "SELECT DISTINCT ".$labelField." AS label,".$valueField." AS value FROM ".$table." ".$whereClause." ORDER BY ".$orderByField; $optionRecordset = @mysql_query($sql); optionFromRecordset($optionRecordset,$option,$selectedIndex); @mysql_free_result($optionRecordset); return $option; } /* Creates an array from a SQL recordset Input: $recordset = mysql_recordset with values of ['value'] and ['label'] &$option = by reference array to add entries to $selectedIndex = $valueField value if equal to the ['value'], set ['selected'] = true, otherwise false */ function optionFromRecordset($recordset,&$option,$selectedIndex) { $offset = count($option); for($i=0;$i<mysql_num_rows($recordset);$i++) { $resultrow = mysql_fetch_assoc($recordset); $option[$i+$offset]['value'] = $resultrow['value']; $option[$i+$offset]['label'] = $resultrow['label']; if($selectedIndex==$resultrow['value']) $option[$i+$offset]['selected'] = true; else $option[$i+$offset]['selected'] = false; } } function generateInputArraySection($fieldTitle,$table,$displayFields,$displayFieldTypes,$hiddenFields,$whereClause) { $i=0; $arraySection = new cvSection($fieldTitle."s"); $arraySection->cvFields[0] = new cvField("",$inputObjects = array( new formInputObject("add".$fieldTitle,"submit","Add"), new formInputObject("_updateArray","hidden",implode(",",$displayFields)), new formInputObject("_updateWhere","hidden",implode(",",$hiddenFields)))); $sql = "SELECT * FROM ".$table." WHERE ".$whereClause; $result = mysql_query($sql); if(@mysql_num_rows($result)>=1) { $arraySection->cvFields[0]->inputObjects[count($arraySection->cvFields[0]->inputObjects)]= new formInputObject("delete".$fieldTitle."s","submit","Delete"); while($row = mysql_fetch_assoc($result)) { for($h=0;$h<count($displayFields);$h++) { $inputObjects[$h] = new formInputObject($displayFields[$h]."__".$i,$displayFieldTypes[$h],$row[$displayFields[$h]]); } $inputObjects[$h]= new formInputObject("Delete__".$i,"checkbox","delete"); $h++; for($j=0;$j<count($hiddenFields);$j++) { $inputObjects[$j+$h] = new formInputObject($hiddenFields[$j]."__".$i,"hidden",$row[$hiddenFields[$j]]); } $arraySection->cvFields[count($arraySection->cvFields)] = new cvField("",$inputObjects); $i++; } } $arraySection->cvFields[count($arraySection->cvFields)] = new cvField("",$inputObjects = array(new formInputObject("_updateArrayCount","hidden",$i))); return $arraySection; } function generateInputArraySection2($result,$fieldTitle,$displayFields,$displayFieldTypes,$hiddenFields) { $i=0; $arraySection = new cvSection($fieldTitle."s"); $arraySection->cvFields[0] = new cvField("",$inputObjects = array( new formInputObject("add".$fieldTitle,"submit","Add"), new formInputObject("_updateArray","hidden",implode(",",$displayFields)), new formInputObject("_updateWhere","hidden",implode(",",$hiddenFields)))); if(@mysql_num_rows($result)>=1) { $arraySection->cvFields[0]->inputObjects[count($arraySection->cvFields[0]->inputObjects)]= new formInputObject("delete".$fieldTitle."s","submit","Delete"); while($row = mysql_fetch_assoc($result)) { for($h=0;$h<count($displayFields);$h++) { $inputObjects[$h] = new formInputObject($displayFields[$h]."__".$i,$displayFieldTypes[$h],$row[$displayFields[$h]]); } $inputObjects[$h]= new formInputObject("Delete__".$i,"checkbox","delete"); $h++; for($j=0;$j<count($hiddenFields);$j++) { $inputObjects[$j+$h] = new formInputObject($hiddenFields[$j]."__".$i,"hidden",$row[$hiddenFields[$j]]); } $arraySection->cvFields[count($arraySection->cvFields)] = new cvField("",$inputObjects); $i++; } } $arraySection->cvFields[count($arraySection->cvFields)] = new cvField("",$inputObjects = array(new formInputObject("_updateArrayCount","hidden",$i))); return $arraySection; } /* Checks to see if a person has an entry in the cv database. Input: $uid = a unique identifier, usually the LDAP uid to match up against cv person.LDAPUID */ function myCVRecord($uid) { $record = false; $sql = "SELECT LDAPUID FROM person WHERE LDAPUID = '".$uid."'"; $result = @mysql_query($sql); if (@mysql_num_rows($result)>=1) $record = true; @mysql_free_result($result); return $record; } ?> \ No newline at end of file +<?php /* optionGenerator, performs an SQL query, and returns an associative array of label, value, and selected (bool) values. Input: $table = table to retrieve info from. $labelField = field in $table to use as the value for the ['label'] $valueField = field in $table to use as the value for the ['value'] $orderByField = field in $table to use as the SQL ORDER BY clause $selectedIndex = $valueField value if equal to the ['value'], set ['selected'] = true, otherwise false $blankEntry = bool value to indicate if a blank entry will be added to this array of elements. $whereClause = SQL WHERE clause, for example "WHERE field = 'value'" */ function optionGenerator($table,$labelField,$valueField,$orderByField,$selectedIndex,$blankEntry=true,$whereClause = "") { $option = array(); if($blankEntry==true) { $option[0]['label']=''; $option[0]['value']=''; if(!isset($selectedIndex) || $selectedIndex == '') $option[0]['selected'] = true; else $option[0]['selected'] = false; } $sql = "SELECT DISTINCT ".$labelField." AS label,".$valueField." AS value FROM ".$table." ".$whereClause." ORDER BY ".$orderByField; $optionRecordset = @mysql_query($sql); optionFromRecordset($optionRecordset,$option,$selectedIndex); @mysql_free_result($optionRecordset); return $option; } /* Creates an array from a SQL recordset Input: $recordset = mysql_recordset with values of ['value'] and ['label'] &$option = by reference array to add entries to $selectedIndex = $valueField value if equal to the ['value'], set ['selected'] = true, otherwise false */ function optionFromRecordset($recordset,&$option,$selectedIndex) { $offset = count($option); for($i=0;$i<mysql_num_rows($recordset);$i++) { $resultrow = mysql_fetch_assoc($recordset); $option[$i+$offset]['value'] = $resultrow['value']; $option[$i+$offset]['label'] = $resultrow['label']; if($selectedIndex==$resultrow['value']) $option[$i+$offset]['selected'] = true; else $option[$i+$offset]['selected'] = false; } } function generateInputArraySection($fieldTitle,$table,$displayFields,$displayFieldTypes,$hiddenFields,$whereClause) { $i=0; $arraySection = new cvSection($fieldTitle."s"); $arraySection->cvFields[0] = new cvField("",$inputObjects = array( new formInputObject("add".$fieldTitle,"submit","Add"), new formInputObject("_updateArray","hidden",implode(",",$displayFields)), new formInputObject("_updateWhere","hidden",implode(",",$hiddenFields)))); $sql = "SELECT * FROM ".$table." WHERE ".$whereClause; $result = mysql_query($sql); if(@mysql_num_rows($result)>=1) { $arraySection->cvFields[0]->inputObjects[count($arraySection->cvFields[0]->inputObjects)]= new formInputObject("delete".$fieldTitle."s","submit","Delete"); while($row = mysql_fetch_assoc($result)) { for($h=0;$h<count($displayFields);$h++) { $inputObjects[$h] = new formInputObject($displayFields[$h]."__".$i,$displayFieldTypes[$h],$row[$displayFields[$h]]); } $inputObjects[$h]= new formInputObject("Delete__".$i,"checkbox","delete"); $h++; for($j=0;$j<count($hiddenFields);$j++) { $inputObjects[$j+$h] = new formInputObject($hiddenFields[$j]."__".$i,"hidden",$row[$hiddenFields[$j]]); } $arraySection->cvFields[count($arraySection->cvFields)] = new cvField("",$inputObjects); $i++; } } $arraySection->cvFields[count($arraySection->cvFields)] = new cvField("",$inputObjects = array(new formInputObject("_updateArrayCount","hidden",$i))); return $arraySection; } function generateInputArraySection2($result,$fieldTitle,$displayFields,$displayFieldTypes,$hiddenFields) { $i=0; $arraySection = new cvSection($fieldTitle."s"); $arraySection->cvFields[0] = new cvField("",$inputObjects = array( new formInputObject("add".$fieldTitle,"submit","Add"), new formInputObject("_updateArray","hidden",implode(",",$displayFields)), new formInputObject("_updateWhere","hidden",implode(",",$hiddenFields)))); if(@mysql_num_rows($result)>=1) { $arraySection->cvFields[0]->inputObjects[count($arraySection->cvFields[0]->inputObjects)]= new formInputObject("delete".$fieldTitle."s","submit","Delete"); while($row = mysql_fetch_assoc($result)) { for($h=0;$h<count($displayFields);$h++) { $inputObjects[$h] = new formInputObject($displayFields[$h]."__".$i,$displayFieldTypes[$h],$row[$displayFields[$h]]); } $inputObjects[$h]= new formInputObject("Delete__".$i,"checkbox","delete"); $h++; for($j=0;$j<count($hiddenFields);$j++) { $inputObjects[$j+$h] = new formInputObject($hiddenFields[$j]."__".$i,"hidden",$row[$hiddenFields[$j]]); } $arraySection->cvFields[count($arraySection->cvFields)] = new cvField("",$inputObjects); $i++; } } $arraySection->cvFields[count($arraySection->cvFields)] = new cvField("",$inputObjects = array(new formInputObject("_updateArrayCount","hidden",$i))); return $arraySection; } /* Checks to see if a person has an entry in the cv database. Input: $uid = a unique identifier, usually the LDAP uid to match up against cv person.LDAPUID */ function myCVRecord($uid) { $record = false; $sql = "SELECT LDAPUID FROM person WHERE LDAPUID = '".$uid."'"; $result = @mysql_query($sql); if (@mysql_num_rows($result)>=1) $record = true; @mysql_free_result($result); return $record; } ?> \ No newline at end of file diff --git a/cvViewer.php b/cvViewer.php index 9d7aa345021f1b99e1e4b17804880a28787f8e28..846dd98734fbc520ad72cf7a5fe16ca2ab8c201d 100644 --- a/cvViewer.php +++ b/cvViewer.php @@ -1,4 +1,4 @@ -<? +<?php /* This page creates a viewable resume/cv for use on a web page. * The resume is identified by the uid value in the querystring. * This uses the php resume class (resume.class.php) extensively! @@ -27,7 +27,7 @@ <div style="text-align:right;margin-bottom:0.5em;"> <a class="sseriftext" href="http://ucommxsrv1.unl.edu/mycv/">Edit myCV</a> </div> -<? +<?php // Create a new Resume Object from the UID in the querystring $resume = new Resume($_GET['uid']); if($resume->ResumeId."" != "") diff --git a/education.php b/education.php index 1ba3594dd555d6597cf6ca908321e7e43dab759a..e5733c8d483fe55ba5222b2f7d894a7fa4c5d781 100644 --- a/education.php +++ b/education.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); ?> <? require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); ?> <? require("cv.class.php"); ?> <? $cells = array( array("Institution","Degree","Degree Type","Start Date","End Date","<a href='EducationDetail.php'>Add</a>")); $sql = "SELECT ". "organization.Name AS institution,". "education.EducationId AS educationid,". "degree.StartDate AS startdate,". "degree.EndDate AS enddate,". "degree.Name AS name,". "degree_type.Description AS description ". "FROM education,degree,organization,degree_type ". "WHERE degree.DegreeTypeId=degree_type.DegreeTypeId AND education.OrganizationId=organization.OrganizationId AND degree.EducationId=education.EducationId AND education.ResumeId=".$_SESSION['ResumeId']; $eresult = @mysql_query($sql); $i=1; while($erow = @mysql_fetch_assoc($eresult)) { $cells[$i] = array( $erow['institution'], $erow['name'], $erow['description'], $erow['startdate'], $erow['enddate'], "<a href='EducationDetail.php?eid=".$erow['educationid']."'>Edit</a>"); $i++; } @mysql_free_result($eresult); $educationSection = new cvSection("Education"); $educationSection->cvFields[0] = new cvTableField("educationtable",$cells); $educationPage = new cvPage("education",array($educationSection)); $educationPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Institution","Degree","Degree Type","Start Date","End Date","<a href='EducationDetail.php'>Add</a>")); $sql = "SELECT ". "organization.Name AS institution,". "education.EducationId AS educationid,". "degree.StartDate AS startdate,". "degree.EndDate AS enddate,". "degree.Name AS name,". "degree_type.Description AS description ". "FROM education,degree,organization,degree_type ". "WHERE degree.DegreeTypeId=degree_type.DegreeTypeId AND education.OrganizationId=organization.OrganizationId AND degree.EducationId=education.EducationId AND education.ResumeId=".$_SESSION['ResumeId']; $eresult = @mysql_query($sql); $i=1; while($erow = @mysql_fetch_assoc($eresult)) { $cells[$i] = array( $erow['institution'], $erow['name'], $erow['description'], $erow['startdate'], $erow['enddate'], "<a href='EducationDetail.php?eid=".$erow['educationid']."'>Edit</a>"); $i++; } @mysql_free_result($eresult); $educationSection = new cvSection("Education"); $educationSection->cvFields[0] = new cvTableField("educationtable",$cells); $educationPage = new cvPage("education",array($educationSection)); $educationPage->display(); ?> \ No newline at end of file diff --git a/employment.php b/employment.php index 01babe28f2fb6e7f055c5860f4784fe6013731f9..7e2f92d7d2bb9de1f076a1a1324baf3f2929111c 100644 --- a/employment.php +++ b/employment.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); ?> <? require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); ?> <? require("cv.class.php"); ?> <? $cells = array( array("Employer","Position","Client","Start Date","End Date","<a title='Click to add an Employer' href='employmentHistoryDetail.php'>ADD</a>")); $sql = "SELECT ". "employment.EmploymentId AS eid,". "role.Description AS title,". "organization.Name AS employer,". "client.Name AS client,". "employment.StartDate AS startdate,". "employment.EndDate AS enddate ". "FROM employment, organization AS organization, organization AS client, role, job ". "WHERE role.RoleId=job.RoleId AND client.OrganizationId=job.OrganizationId AND job.EmploymentId=employment.EmploymentId AND organization.OrganizationId=employment.EmployerId AND employment.ResumeId=".$_SESSION['ResumeId']; $eresult = mysql_query($sql) or die(mysql_error()); $i=1; if(mysql_num_rows($eresult)>=1) { while($erow = mysql_fetch_assoc($eresult)) { $cells[$i] = array($erow["employer"]); $cells[$i+1] = array(); $cells[$i+1][0] = ""; $cells[$i+1][1] = $erow['title']; $cells[$i+1][2] = $erow['client'];//client $cells[$i+1][3] = $erow['startdate']; if(strtotime($erow['enddate'])==-1 || strtotime($erow['enddate']) > time() || substr($erow['enddate'],0,4)=='0000') { $cells[$i+1][4] = "Current"; } else { $cells[$i+1][4] = $erow['enddate']; } $cells[$i+1][5] = "<a href='employmentHistoryDetail.php?eid=".$erow['eid']."'>Edit</a>"; $i=$i+2; } } $employmentSection = new cvSection("Employment History"); $employmentSection->cvFields[0] = new cvTableField("employmenttable",$cells); $employmentPage = new cvPage("employment",array($employmentSection)); $employmentPage->displayForm = false; $employmentPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Employer","Position","Client","Start Date","End Date","<a title='Click to add an Employer' href='employmentHistoryDetail.php'>ADD</a>")); $sql = "SELECT ". "employment.EmploymentId AS eid,". "role.Description AS title,". "organization.Name AS employer,". "client.Name AS client,". "employment.StartDate AS startdate,". "employment.EndDate AS enddate ". "FROM employment, organization AS organization, organization AS client, role, job ". "WHERE role.RoleId=job.RoleId AND client.OrganizationId=job.OrganizationId AND job.EmploymentId=employment.EmploymentId AND organization.OrganizationId=employment.EmployerId AND employment.ResumeId=".$_SESSION['ResumeId']; $eresult = mysql_query($sql) or die(mysql_error()); $i=1; if(mysql_num_rows($eresult)>=1) { while($erow = mysql_fetch_assoc($eresult)) { $cells[$i] = array($erow["employer"]); $cells[$i+1] = array(); $cells[$i+1][0] = ""; $cells[$i+1][1] = $erow['title']; $cells[$i+1][2] = $erow['client'];//client $cells[$i+1][3] = $erow['startdate']; if(strtotime($erow['enddate'])==-1 || strtotime($erow['enddate']) > time() || substr($erow['enddate'],0,4)=='0000') { $cells[$i+1][4] = "Current"; } else { $cells[$i+1][4] = $erow['enddate']; } $cells[$i+1][5] = "<a href='employmentHistoryDetail.php?eid=".$erow['eid']."'>Edit</a>"; $i=$i+2; } } $employmentSection = new cvSection("Employment History"); $employmentSection->cvFields[0] = new cvTableField("employmenttable",$cells); $employmentPage = new cvPage("employment",array($employmentSection)); $employmentPage->displayForm = false; $employmentPage->display(); ?> \ No newline at end of file diff --git a/employmentHistoryDetail.php b/employmentHistoryDetail.php index ad874c4ae9a6320b203947fe958698a2011ca45c..cd2165f9ca5936880105c9989a25aa6bcdd9a5f1 100644 --- a/employmentHistoryDetail.php +++ b/employmentHistoryDetail.php @@ -1 +1 @@ -<? ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $_SESSION['table'] = "employment"; $eid = @$_GET['eid']; $sql = "SELECT ". "job.OrganizationId AS clientid,". "employment.EmploymentId AS employmentid,". "job.StartDate AS startdate,". "job.EndDate AS enddate,". "employment.EmployerId AS employerid,". "job.RoleId AS positionid,". "job.Title AS title,". "job.JobId AS jobid,". "job.Description AS description ". "FROM employment,role,job ". "WHERE job.EmploymentId=employment.EmploymentId AND employment.ResumeId = ".$_SESSION['ResumeId']." AND employment.EmploymentId=".$eid; $eDetailResult = @mysql_query($sql); if(@mysql_num_rows($eDetailResult) >= 1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $edrow = @mysql_fetch_assoc($eDetailResult); $employmentSection = new cvSection("Employment History Detail"); $eoption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$edrow['employerid'],false); $employmentSection->cvFields[0] = new cvField("Employer",array( new formOptionObject("OrganizationId",$eoption), "<a href='DropDownLookup.php?table=organization'>Edit List</a>", new formInputObject("EmploymentId","hidden",$edrow['employmentid']), new formInputObject("JobId","hidden",$edrow['jobid']))); $employmentSection->cvFields[1] = new cvField("Start Date",array(new formInputObject("Start_Date","text",$edrow['startdate']))); $employmentSection->cvFields[2] = new cvField("End Date",array(new formInputObject("End_Date","text",$edrow['enddate']))); $coption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$edrow['clientid'],false); $employmentSection->cvFields[3] = new cvField("Client",array(new formOptionObject("ClientId",$coption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>")); $poption = optionGenerator("role","Description","RoleId","Description",$edrow['positionid'],false); $employmentSection->cvFields[4] = new cvField("Position",array(new formOptionObject("RoleId",$poption),"<a href='DropDownLookup.php?table=role'>Edit List</a>")); $employmentSection->cvFields[5] = new cvField("Title",array(new formInputObject("Title","text",$edrow['title']))); $employmentSection->cvFields[6] = new cvField("Description",array(new formInputObject("Description","textarea",$edrow['description'],50,6))); /* Now a table for Acheivements */ $achievementSection = generateInputArraySection("Achievement","achievement",array("Description"),array("textarea"),array("AchievementId"),"JobId=".$edrow['jobid']); @mysql_free_result($eDetailResult); $employmentPage = new cvPage("employment",array($employmentSection,@$achievementSection)); $employmentPage->displayDeleteButton=true; $employmentPage->displayCancelButton=true; $employmentPage->display(); ?> \ No newline at end of file +<?php ini_set("display_errors",true); require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require_once("cv.functions.php"); $_SESSION['table'] = "employment"; $eid = @$_GET['eid']; $sql = "SELECT ". "job.OrganizationId AS clientid,". "employment.EmploymentId AS employmentid,". "job.StartDate AS startdate,". "job.EndDate AS enddate,". "employment.EmployerId AS employerid,". "job.RoleId AS positionid,". "job.Title AS title,". "job.JobId AS jobid,". "job.Description AS description ". "FROM employment,role,job ". "WHERE job.EmploymentId=employment.EmploymentId AND employment.ResumeId = ".$_SESSION['ResumeId']." AND employment.EmploymentId=".$eid; $eDetailResult = @mysql_query($sql); if(@mysql_num_rows($eDetailResult) >= 1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $edrow = @mysql_fetch_assoc($eDetailResult); $employmentSection = new cvSection("Employment History Detail"); $eoption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$edrow['employerid'],false); $employmentSection->cvFields[0] = new cvField("Employer",array( new formOptionObject("OrganizationId",$eoption), "<a href='DropDownLookup.php?table=organization'>Edit List</a>", new formInputObject("EmploymentId","hidden",$edrow['employmentid']), new formInputObject("JobId","hidden",$edrow['jobid']))); $employmentSection->cvFields[1] = new cvField("Start Date",array(new formInputObject("Start_Date","text",$edrow['startdate']))); $employmentSection->cvFields[2] = new cvField("End Date",array(new formInputObject("End_Date","text",$edrow['enddate']))); $coption = optionGenerator("organization","Name","OrganizationId","OrganizationId",$edrow['clientid'],false); $employmentSection->cvFields[3] = new cvField("Client",array(new formOptionObject("ClientId",$coption),"<a href='DropDownLookup.php?table=organization'>Edit List</a>")); $poption = optionGenerator("role","Description","RoleId","Description",$edrow['positionid'],false); $employmentSection->cvFields[4] = new cvField("Position",array(new formOptionObject("RoleId",$poption),"<a href='DropDownLookup.php?table=role'>Edit List</a>")); $employmentSection->cvFields[5] = new cvField("Title",array(new formInputObject("Title","text",$edrow['title']))); $employmentSection->cvFields[6] = new cvField("Description",array(new formInputObject("Description","textarea",$edrow['description'],50,6))); /* Now a table for Acheivements */ $achievementSection = generateInputArraySection("Achievement","achievement",array("Description"),array("textarea"),array("AchievementId"),"JobId=".$edrow['jobid']); @mysql_free_result($eDetailResult); $employmentPage = new cvPage("employment",array($employmentSection,@$achievementSection)); $employmentPage->displayDeleteButton=true; $employmentPage->displayCancelButton=true; $employmentPage->display(); ?> \ No newline at end of file diff --git a/hr-xml_resume.php b/hr-xml_resume.php index 817d8de608d4bb69f1dcb7f8d21427e87caefacd..5477e761ad8aa481c4fb6441b50050596c79af91 100644 --- a/hr-xml_resume.php +++ b/hr-xml_resume.php @@ -1 +1 @@ -<? ini_set("display_errors",true); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require_once("/Library/WebServer/Documents/mycv/cv.functions.php"); require_once("/Library/WebServer/Documents/peoplefinder/peoplefinder.functions.php"); $sql = "SELECT ". "CONCAT(person.FirstName,' ',person.LastName) AS formattedname, ". "person.Phone AS telephone, ". "person.Fax AS fax, ". "person.Email AS email, ". "objective.Description AS objective, ". "summary.Description AS summary ". "FROM person, summary, resume, usr, objective ". "WHERE ". "usr.PersonId = person.PersonId AND ". "resume.UserId = usr.UserId AND ". "objective.ResumeId = resume.ResumeId AND ". "summary.ResumeId = resume.ResumeId AND ". "summary.SummaryType = 'S' AND ". "person.LDAPUID = '".$_GET['uid']."'"; $result = mysql_query($sql); echo mysql_error(); $resume = mysql_fetch_assoc($result); header("Content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; echo "<?xml-stylesheet type=\"text/xml\" href=\"xslt/unlResume.xsl\" ?>\n"; ?> <Resume xml:lang="EN" xmlns="http://ns.hr-xml.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.hr-xml.org Resume.xsd"> <ResumeId> <IdValue><? echo $_GET['uid']; ?></IdValue> </ResumeId> <DistributionGuidelines> <DoNotDistributeTo> <Name>Wilson Research Laboratories</Name> </DoNotDistributeTo> </DistributionGuidelines> <StructuredXMLResume> <ContactInfo> <PersonName> <FormattedName><? echo $resume['formattedname']; ?></FormattedName> </PersonName> <ContactMethod> <Telephone> <FormattedNumber><? echo $resume['telephone']; ?></FormattedNumber> </Telephone> <Fax> <FormattedNumber><? echo $resume['fax']; ?></FormattedNumber> </Fax> <InternetEmailAddress><? echo $resume['email']; ?></InternetEmailAddress> <InternetWebAddress>http://www.cc.gatech.edu/~jaexample/</InternetWebAddress> <PostalAddress> <CountryCode>US</CountryCode> <PostalCode>12345-1234</PostalCode> <Region>GA</Region> <Municipality>Atlanta</Municipality> <Recipient> <OrganizationName>College of Computing, Georgia Institute of Technology</OrganizationName> </Recipient> </PostalAddress> </ContactMethod> </ContactInfo> <ExecutiveSummary><? echo $resume['summary']; ?></ExecutiveSummary> <Objective><? echo $resume['objective']; ?></Objective> <? if (@$employmentSectionIsValid) { ?> <EmploymentHistory> <EmployerOrg> <EmployerOrgName>IBM</EmployerOrgName> <EmployerContactInfo> <LocationSummary> <Municipality>Yorktown Heights</Municipality> <Region>NY</Region> </LocationSummary> </EmployerContactInfo> <PositionHistory positionType="internship"> <Title/> <OrgName> <OrganizationName>T.J. Watson Research Center</OrganizationName> </OrgName> <Description>Designed and prototyped extensions to Babble, a distributed workgroup support system developed at IBM Research. Babble allows members of a workgroup to stay in contact through semi-synchronous textual discussion (both public and private) and variety of awareness aids. Performed an in-depth analysis of the system as it currently exists and created a number of design sketches, prototypes, and working versions of an improved Babble that supports much richer interaction. Two patents are pending on this work. </Description> <StartDate> <YearMonth>1998-06</YearMonth> </StartDate> <EndDate> <YearMonth>1998-08</YearMonth> </EndDate> </PositionHistory> </EmployerOrg> </EmploymentHistory> <? } //end if employmentSection ?> <? if (@$educationHistoryIsValud) { ?> <EducationHistory> <SchoolOrInstitution schoolType="trade"> <School> <InternetDomainName>www.gatech.edu</InternetDomainName> <SchoolName>Georgia Institute of Technology</SchoolName> </School> <Degree degreeType="doctorate"> <DegreeName>Ph.D.</DegreeName> <DegreeDate> <YearMonth>2002-12</YearMonth> </DegreeDate> <DegreeMajor> <Name>Computer Science</Name> </DegreeMajor> <DegreeMinor> <Name>History, Technology, and Society</Name> </DegreeMinor> <Comments>Dissertation advisor: Amy Breck</Comments> </Degree> </SchoolOrInstitution> </EducationHistory> <? } //end if educationHistory ?> <? if (@$licensesAndCertificates) { ?> <LicensesAndCertifications> <LicenseOrCertification> <Name>Microsoft Certified Systems Engineer</Name> <Id/> <IssuingAuthority>Microsoft</IssuingAuthority> <Description>Analyze business requirements to design and implement an infrastructure solution based on the Windows platform and Microsoft Servers software.</Description> <EffectiveDate> <ValidFrom> <AnyDate>2002-01-01</AnyDate> </ValidFrom> <ValidTo> <AnyDate>2003-01-01</AnyDate> </ValidTo> </EffectiveDate> </LicenseOrCertification> </LicensesAndCertifications> <? } ?> <? if(@$patentHistory) { ?> <PatentHistory> <Patent> <PatentTitle>Method for Translucent Online Interaction</PatentTitle> <Description/> <Inventors> <InventorName>Rachel R. Bell</InventorName> <InventorName>John A. Example</InventorName> </Inventors> <PatentDetail> <PatentMilestone> <Status>PatentPending</Status> <Date>2000-09-12</Date> </PatentMilestone> </PatentDetail> </Patent> </PatentHistory> <? } ?> <? if (@$publicationHistory) { ?> <PublicationHistory> <Article> <Title>Designing Interfaces for Youth Services Information Management.</Title> <Name role="author"> <FormattedName>John A. Example</FormattedName> </Name> <PublicationDate> <YearMonth>1996-06</YearMonth> </PublicationDate> <JournalOrSerialName>1996 Human-Computer Interaction Laboratory Video Reports, K. Pleasant, Ed., </JournalOrSerialName> <Volume>vol. 2</Volume> <Issue>no. 3</Issue> <PageNumber>pp.319-329</PageNumber> <PublicationLanguage>EN</PublicationLanguage> </Article> <Book> <Title>XML in a Seashell</Title> <Name role="author"> <FormattedName>John A. Example</FormattedName> </Name> <PublicationDate> <YearMonth>2001-02</YearMonth> </PublicationDate> <Abstract>A very readable introduction to XML for readers with existing knowledge of markup and Web technologies. </Abstract> <Copyright> <CopyrightDates> <OriginalDate> <Year>2001</Year> </OriginalDate> </CopyrightDates> <CopyrightText>Copyright 2nd edition</CopyrightText> </Copyright> <Edition>2nd Edition</Edition> <ISBN>0596000222</ISBN> <PublisherName>O'Malley Associates</PublisherName> <PublisherLocation> Garden City, NY, US </PublisherLocation> </Book> <ConferencePaper> <Title>Trends in Employee Benefit Offerings</Title> <Name role="author"> <FormattedName>Debra J. Cohen</FormattedName> </Name> <EventName>SHRM 55th Annual Conference and Exposition</EventName> <ConferenceDate> <AnyDate>2003-06-10</AnyDate> </ConferenceDate> <ConferenceLocation>Orlando, FL</ConferenceLocation> </ConferencePaper> <OtherPublication type="x:Software"> <Title>UCLA Tree-Repeater-Interconnect-Optimization (TRIO) Package</Title> <Name role="x:developer"> <FormattedName>John A. Example</FormattedName> </Name> <PublicationDate> <Year>2002</Year> </PublicationDate> <Link>http://ballade.cs.ucla.edu/~cong/slides/vlsi99.pdf</Link> </OtherPublication> </PublicationHistory> <? } ?> <? if (@$speakingEventsHistory) { ?> <SpeakingEventsHistory> <SpeakingEvent type="x:reviewer"> <StartDate> <Year>1997</Year> </StartDate> <EventName>ACM/IEEE Design Automation Conference (DAC)</EventName> <EventType>conference</EventType> <Link>http://www.ACMDAC.com</Link> </SpeakingEvent> </SpeakingEventsHistory> <? } ?> <? if (@$qualifications) { ?> <Qualifications> <Competency name="Communication Skills"> <Competency name="Written Communication Skills"> <CompetencyEvidence name="WRITTENTEST1-A" dateOfIncident="1995-01-01" lastUsed="2000-01-01"> <NumericValue minValue="3" maxValue="5" description="SEP-equivalent Skill-Level Range">5</NumericValue> </CompetencyEvidence> <CompetencyWeight> <NumericValue minValue="0" maxValue="100">35</NumericValue> </CompetencyWeight> </Competency> </Competency> </Qualifications> <? } ?> <? if (@$languages) { ?> <Languages> <Language> <LanguageCode>EN</LanguageCode> <Read>true</Read> <Write>true</Write> <Speak>true</Speak> </Language> </Languages> <? } ?> <? if (@$achievements) { ?> <Achievements> <Achievement> <Date> <StringDate>2001-2002</StringDate> </Date> <Description>Intel Foundation Graduate Fellowship</Description> </Achievement> </Achievements> <? } ?> <? if (@$associations) { ?> <Associations> <Association type="Professional"> <Name>HR-XML Consortium</Name> <Link>www.hr-xml.org</Link> <StartDate> <YearMonth>2000-01</YearMonth> </StartDate> <Role> <Name>Recruiting and Staffing Project Lead</Name> <Deliverable>Resume 2.0 Specification</Deliverable> <StartDate> <YearMonth>2002-03</YearMonth> </StartDate> <EndDate> <YearMonth>2003-07</YearMonth> </EndDate> </Role> <Comments>Membership through current employer.</Comments> </Association> </Associations> <? } ?> <? if (@$references) { ?> <References> <Reference type="Professional"> <PersonName> <FormattedName>Dr. Amy R. Breck</FormattedName> </PersonName> <PositionTitle>Advisor</PositionTitle> <ContactMethod> <Telephone> <FormattedNumber>1 404 1224567</FormattedNumber> </Telephone> <InternetEmailAddress>arbreck@cc.gatech.edu</InternetEmailAddress> </ContactMethod> <Comments>College of Computing, Georgia Institute of Technology</Comments> </Reference> </References> <? } ?> <? if (@$securityCredentials) { ?> <SecurityCredentials> <SecurityCredential> <Name>Top Secret Security Clearance (Active)</Name> <IssuingAuthority>Department of Defence</IssuingAuthority> <Description>Currently holding a top secret security clearance for my previous job with in the Central Intelligence Agency</Description> <EffectiveDate> <ValidFrom> <StringDate>4/1/1997</StringDate> </ValidFrom> <ValidTo> <StringDate>4/1/2003</StringDate> </ValidTo> <FirstIssuedDate> <StringDate>4/1/1997</StringDate> </FirstIssuedDate> </EffectiveDate> </SecurityCredential> </SecurityCredentials> <? } ?> <? if (@$resumeAdditionalItems) { ?> <ResumeAdditionalItems> <ResumeAdditionalItem type="Hobbies"> <EffectiveDate> <StartDate> <Year>2000</Year> </StartDate> </EffectiveDate> <Description>Rock Climbing</Description> </ResumeAdditionalItem> </ResumeAdditionalItems> <? } ?> <RevisionDate>2003-03-13</RevisionDate> </StructuredXMLResume> <NonXMLResume> <TextResume>The resume text would be entered here. No formatting would apply.</TextResume> <SupportingMaterials> <Link>http://www.my-resume.com</Link> <Description>Link to my online resume</Description> </SupportingMaterials> </NonXMLResume> </Resume> \ No newline at end of file +<?php ini_set("display_errors",true); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require_once("/Library/WebServer/Documents/mycv/cv.functions.php"); require_once("/Library/WebServer/Documents/peoplefinder/peoplefinder.functions.php"); $sql = "SELECT ". "CONCAT(person.FirstName,' ',person.LastName) AS formattedname, ". "person.Phone AS telephone, ". "person.Fax AS fax, ". "person.Email AS email, ". "objective.Description AS objective, ". "summary.Description AS summary ". "FROM person, summary, resume, usr, objective ". "WHERE ". "usr.PersonId = person.PersonId AND ". "resume.UserId = usr.UserId AND ". "objective.ResumeId = resume.ResumeId AND ". "summary.ResumeId = resume.ResumeId AND ". "summary.SummaryType = 'S' AND ". "person.LDAPUID = '".$_GET['uid']."'"; $result = mysql_query($sql); echo mysql_error(); $resume = mysql_fetch_assoc($result); header("Content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; echo "<?xml-stylesheet type=\"text/xml\" href=\"xslt/unlResume.xsl\" ?>\n"; ?> <Resume xml:lang="EN" xmlns="http://ns.hr-xml.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.hr-xml.org Resume.xsd"> <ResumeId> <IdValue><?php echo $_GET['uid']; ?></IdValue> </ResumeId> <DistributionGuidelines> <DoNotDistributeTo> <Name>Wilson Research Laboratories</Name> </DoNotDistributeTo> </DistributionGuidelines> <StructuredXMLResume> <ContactInfo> <PersonName> <FormattedName><?php echo $resume['formattedname']; ?></FormattedName> </PersonName> <ContactMethod> <Telephone> <FormattedNumber><?php echo $resume['telephone']; ?></FormattedNumber> </Telephone> <Fax> <FormattedNumber><?php echo $resume['fax']; ?></FormattedNumber> </Fax> <InternetEmailAddress><?php echo $resume['email']; ?></InternetEmailAddress> <InternetWebAddress>http://www.cc.gatech.edu/~jaexample/</InternetWebAddress> <PostalAddress> <CountryCode>US</CountryCode> <PostalCode>12345-1234</PostalCode> <Region>GA</Region> <Municipality>Atlanta</Municipality> <Recipient> <OrganizationName>College of Computing, Georgia Institute of Technology</OrganizationName> </Recipient> </PostalAddress> </ContactMethod> </ContactInfo> <ExecutiveSummary><?php echo $resume['summary']; ?></ExecutiveSummary> <Objective><?php echo $resume['objective']; ?></Objective> <?php if (@$employmentSectionIsValid) { ?> <EmploymentHistory> <EmployerOrg> <EmployerOrgName>IBM</EmployerOrgName> <EmployerContactInfo> <LocationSummary> <Municipality>Yorktown Heights</Municipality> <Region>NY</Region> </LocationSummary> </EmployerContactInfo> <PositionHistory positionType="internship"> <Title/> <OrgName> <OrganizationName>T.J. Watson Research Center</OrganizationName> </OrgName> <Description>Designed and prototyped extensions to Babble, a distributed workgroup support system developed at IBM Research. Babble allows members of a workgroup to stay in contact through semi-synchronous textual discussion (both public and private) and variety of awareness aids. Performed an in-depth analysis of the system as it currently exists and created a number of design sketches, prototypes, and working versions of an improved Babble that supports much richer interaction. Two patents are pending on this work. </Description> <StartDate> <YearMonth>1998-06</YearMonth> </StartDate> <EndDate> <YearMonth>1998-08</YearMonth> </EndDate> </PositionHistory> </EmployerOrg> </EmploymentHistory> <?php } //end if employmentSection ?> <?php if (@$educationHistoryIsValud) { ?> <EducationHistory> <SchoolOrInstitution schoolType="trade"> <School> <InternetDomainName>www.gatech.edu</InternetDomainName> <SchoolName>Georgia Institute of Technology</SchoolName> </School> <Degree degreeType="doctorate"> <DegreeName>Ph.D.</DegreeName> <DegreeDate> <YearMonth>2002-12</YearMonth> </DegreeDate> <DegreeMajor> <Name>Computer Science</Name> </DegreeMajor> <DegreeMinor> <Name>History, Technology, and Society</Name> </DegreeMinor> <Comments>Dissertation advisor: Amy Breck</Comments> </Degree> </SchoolOrInstitution> </EducationHistory> <?php } //end if educationHistory ?> <?php if (@$licensesAndCertificates) { ?> <LicensesAndCertifications> <LicenseOrCertification> <Name>Microsoft Certified Systems Engineer</Name> <Id/> <IssuingAuthority>Microsoft</IssuingAuthority> <Description>Analyze business requirements to design and implement an infrastructure solution based on the Windows platform and Microsoft Servers software.</Description> <EffectiveDate> <ValidFrom> <AnyDate>2002-01-01</AnyDate> </ValidFrom> <ValidTo> <AnyDate>2003-01-01</AnyDate> </ValidTo> </EffectiveDate> </LicenseOrCertification> </LicensesAndCertifications> <?php } ?> <?php if(@$patentHistory) { ?> <PatentHistory> <Patent> <PatentTitle>Method for Translucent Online Interaction</PatentTitle> <Description/> <Inventors> <InventorName>Rachel R. Bell</InventorName> <InventorName>John A. Example</InventorName> </Inventors> <PatentDetail> <PatentMilestone> <Status>PatentPending</Status> <Date>2000-09-12</Date> </PatentMilestone> </PatentDetail> </Patent> </PatentHistory> <?php } ?> <?php if (@$publicationHistory) { ?> <PublicationHistory> <Article> <Title>Designing Interfaces for Youth Services Information Management.</Title> <Name role="author"> <FormattedName>John A. Example</FormattedName> </Name> <PublicationDate> <YearMonth>1996-06</YearMonth> </PublicationDate> <JournalOrSerialName>1996 Human-Computer Interaction Laboratory Video Reports, K. Pleasant, Ed., </JournalOrSerialName> <Volume>vol. 2</Volume> <Issue>no. 3</Issue> <PageNumber>pp.319-329</PageNumber> <PublicationLanguage>EN</PublicationLanguage> </Article> <Book> <Title>XML in a Seashell</Title> <Name role="author"> <FormattedName>John A. Example</FormattedName> </Name> <PublicationDate> <YearMonth>2001-02</YearMonth> </PublicationDate> <Abstract>A very readable introduction to XML for readers with existing knowledge of markup and Web technologies. </Abstract> <Copyright> <CopyrightDates> <OriginalDate> <Year>2001</Year> </OriginalDate> </CopyrightDates> <CopyrightText>Copyright 2nd edition</CopyrightText> </Copyright> <Edition>2nd Edition</Edition> <ISBN>0596000222</ISBN> <PublisherName>O'Malley Associates</PublisherName> <PublisherLocation> Garden City, NY, US </PublisherLocation> </Book> <ConferencePaper> <Title>Trends in Employee Benefit Offerings</Title> <Name role="author"> <FormattedName>Debra J. Cohen</FormattedName> </Name> <EventName>SHRM 55th Annual Conference and Exposition</EventName> <ConferenceDate> <AnyDate>2003-06-10</AnyDate> </ConferenceDate> <ConferenceLocation>Orlando, FL</ConferenceLocation> </ConferencePaper> <OtherPublication type="x:Software"> <Title>UCLA Tree-Repeater-Interconnect-Optimization (TRIO) Package</Title> <Name role="x:developer"> <FormattedName>John A. Example</FormattedName> </Name> <PublicationDate> <Year>2002</Year> </PublicationDate> <Link>http://ballade.cs.ucla.edu/~cong/slides/vlsi99.pdf</Link> </OtherPublication> </PublicationHistory> <?php } ?> <?php if (@$speakingEventsHistory) { ?> <SpeakingEventsHistory> <SpeakingEvent type="x:reviewer"> <StartDate> <Year>1997</Year> </StartDate> <EventName>ACM/IEEE Design Automation Conference (DAC)</EventName> <EventType>conference</EventType> <Link>http://www.ACMDAC.com</Link> </SpeakingEvent> </SpeakingEventsHistory> <?php } ?> <?php if (@$qualifications) { ?> <Qualifications> <Competency name="Communication Skills"> <Competency name="Written Communication Skills"> <CompetencyEvidence name="WRITTENTEST1-A" dateOfIncident="1995-01-01" lastUsed="2000-01-01"> <NumericValue minValue="3" maxValue="5" description="SEP-equivalent Skill-Level Range">5</NumericValue> </CompetencyEvidence> <CompetencyWeight> <NumericValue minValue="0" maxValue="100">35</NumericValue> </CompetencyWeight> </Competency> </Competency> </Qualifications> <?php } ?> <?php if (@$languages) { ?> <Languages> <Language> <LanguageCode>EN</LanguageCode> <Read>true</Read> <Write>true</Write> <Speak>true</Speak> </Language> </Languages> <?php } ?> <?php if (@$achievements) { ?> <Achievements> <Achievement> <Date> <StringDate>2001-2002</StringDate> </Date> <Description>Intel Foundation Graduate Fellowship</Description> </Achievement> </Achievements> <?php } ?> <?php if (@$associations) { ?> <Associations> <Association type="Professional"> <Name>HR-XML Consortium</Name> <Link>www.hr-xml.org</Link> <StartDate> <YearMonth>2000-01</YearMonth> </StartDate> <Role> <Name>Recruiting and Staffing Project Lead</Name> <Deliverable>Resume 2.0 Specification</Deliverable> <StartDate> <YearMonth>2002-03</YearMonth> </StartDate> <EndDate> <YearMonth>2003-07</YearMonth> </EndDate> </Role> <Comments>Membership through current employer.</Comments> </Association> </Associations> <?php } ?> <?php if (@$references) { ?> <References> <Reference type="Professional"> <PersonName> <FormattedName>Dr. Amy R. Breck</FormattedName> </PersonName> <PositionTitle>Advisor</PositionTitle> <ContactMethod> <Telephone> <FormattedNumber>1 404 1224567</FormattedNumber> </Telephone> <InternetEmailAddress>arbreck@cc.gatech.edu</InternetEmailAddress> </ContactMethod> <Comments>College of Computing, Georgia Institute of Technology</Comments> </Reference> </References> <?php } ?> <?php if (@$securityCredentials) { ?> <SecurityCredentials> <SecurityCredential> <Name>Top Secret Security Clearance (Active)</Name> <IssuingAuthority>Department of Defence</IssuingAuthority> <Description>Currently holding a top secret security clearance for my previous job with in the Central Intelligence Agency</Description> <EffectiveDate> <ValidFrom> <StringDate>4/1/1997</StringDate> </ValidFrom> <ValidTo> <StringDate>4/1/2003</StringDate> </ValidTo> <FirstIssuedDate> <StringDate>4/1/1997</StringDate> </FirstIssuedDate> </EffectiveDate> </SecurityCredential> </SecurityCredentials> <?php } ?> <?php if (@$resumeAdditionalItems) { ?> <ResumeAdditionalItems> <ResumeAdditionalItem type="Hobbies"> <EffectiveDate> <StartDate> <Year>2000</Year> </StartDate> </EffectiveDate> <Description>Rock Climbing</Description> </ResumeAdditionalItem> </ResumeAdditionalItems> <?php } ?> <RevisionDate>2003-03-13</RevisionDate> </StructuredXMLResume> <NonXMLResume> <TextResume>The resume text would be entered here. No formatting would apply.</TextResume> <SupportingMaterials> <Link>http://www.my-resume.com</Link> <Description>Link to my online resume</Description> </SupportingMaterials> </NonXMLResume> </Resume> \ No newline at end of file diff --git a/index.php b/index.php index b5426a7139cc2ce04412e2bdcfa415618b685ce0..75d24b6d10580c45bbf0461c0796001726842159 100644 --- a/index.php +++ b/index.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $intro = new cvSection("Welcome"); $intro->cvFields[0] = new cvField("",array("Welcome to UNL's myCV.<br /><br />Click the area you wish to edit.")); $indexPage = new cvPage("myCV",array($intro)); $indexPage->displayForm = false; $indexPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $intro = new cvSection("Welcome"); $intro->cvFields[0] = new cvField("",array("Welcome to UNL's myCV.<br /><br />Click the area you wish to edit.")); $indexPage = new cvPage("myCV",array($intro)); $indexPage->displayForm = false; $indexPage->display(); ?> \ No newline at end of file diff --git a/jcvDB.php b/jcvDB.php index 3c5773e09c8fceb66cdc1af7b31a11261858acae..0a7ccc9d7cbdf47def9ab1f7f60370befc85c852 100644 --- a/jcvDB.php +++ b/jcvDB.php @@ -1 +1 @@ -<? /* This file holds the credentials and connection data for the database */ $database = "jcv"; $dbuser = "jcv"; $dbpwd = ""; $GLOBALS['link_identifier'] = @mysql_connect("localhost", $dbuser, $dbpwd); @mysql_select_db($database,$GLOBALS['link_identifier']); ?> \ No newline at end of file +<?php /* This file holds the credentials and connection data for the database */ $database = "jcv"; $dbuser = "jcv"; $dbpwd = ""; $GLOBALS['link_identifier'] = @mysql_connect("localhost", $dbuser, $dbpwd); @mysql_select_db($database,$GLOBALS['link_identifier']); ?> \ No newline at end of file diff --git a/memberships.php b/memberships.php index 1654e1f754c22a910a0403a0347cda0fc65202da..4f2f795de83a4d00372e4df1a868433e2ad83501 100644 --- a/memberships.php +++ b/memberships.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Award","Date Given","<a href='AwardDetail.php'>ADD</a>")); $sql = "SELECT ". "award.AwardId AS awardid,". "award.Title AS title,". "award.DateGiven AS dategiven,". "organization.Name AS name ". "FROM award, organization ". "WHERE award.OrganizationId=organization.OrganizationId AND award.ResumeId=".$_SESSION['ResumeId']; $aresult = mysql_query($sql); $i=1; while($arow = mysql_fetch_assoc($aresult)) { $cells[$i] = array( $arow['name'], $arow['title'], $arow['dategiven'], "<a href='AwardDetail.php?aid=".$arow['awardid']."'>Edit</a>"); $i++; } $awardsSection = new cvSection("Awards"); $awardsSection->cvFields[0] = new cvTableField("awardstable",$cells); $awardsPage = new cvPage("Awards",array($awardsSection)); $awardsPage->displayForm = false; $awardsPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $cells = array( array("Organization","Award","Date Given","<a href='AwardDetail.php'>ADD</a>")); $sql = "SELECT ". "award.AwardId AS awardid,". "award.Title AS title,". "award.DateGiven AS dategiven,". "organization.Name AS name ". "FROM award, organization ". "WHERE award.OrganizationId=organization.OrganizationId AND award.ResumeId=".$_SESSION['ResumeId']; $aresult = mysql_query($sql); $i=1; while($arow = mysql_fetch_assoc($aresult)) { $cells[$i] = array( $arow['name'], $arow['title'], $arow['dategiven'], "<a href='AwardDetail.php?aid=".$arow['awardid']."'>Edit</a>"); $i++; } $awardsSection = new cvSection("Awards"); $awardsSection->cvFields[0] = new cvTableField("awardstable",$cells); $awardsPage = new cvPage("Awards",array($awardsSection)); $awardsPage->displayForm = false; $awardsPage->display(); ?> \ No newline at end of file diff --git a/mycv.functions.htmlResume.php b/mycv.functions.htmlResume.php index d1b70deb4ac76a1bca12bf525f9494feee64477a..4e4e25168f2f28b30f30520b3a980db2ffb5d088 100644 --- a/mycv.functions.htmlResume.php +++ b/mycv.functions.htmlResume.php @@ -1 +1 @@ -<? function htmlResume($uid) { ?> <span style="border-bottom:1px solid #CC0000;" class="sserifstoryhead"><? echo $resume['formattedname']; ?></span><br /> <p class="sseriftext"><? echo $resume['telephone']; ?><br /></p> <p class="sseriftext"><span style="font-size:1.5em;"class="sserifstoryhead">Objective: </span><br /><? echo $resume['objective']; ?></p> <p class="sseriftext"><span style="font-size:1.5em;" class="sserifstoryhead">Summary: </span><br /><? echo $resume['summary']; ?></p> <? } ?> \ No newline at end of file +<?php function htmlResume($uid) { ?> <span style="border-bottom:1px solid #CC0000;" class="sserifstoryhead"><? echo $resume['formattedname']; ?></span><br /> <p class="sseriftext"><? echo $resume['telephone']; ?><br /></p> <p class="sseriftext"><span style="font-size:1.5em;"class="sserifstoryhead">Objective: </span><br /><? echo $resume['objective']; ?></p> <p class="sseriftext"><span style="font-size:1.5em;" class="sserifstoryhead">Summary: </span><br /><? echo $resume['summary']; ?></p> <?php } ?> \ No newline at end of file diff --git a/objective.php b/objective.php index 5194c1e2c975d961d563941a8db8c7082480660f..76eef90761f18e705720916c7468e757969f4580 100644 --- a/objective.php +++ b/objective.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $_SESSION['table'] = "objective"; $sql = "SELECT objective.Description FROM objective WHERE ResumeId = ".$_SESSION['ResumeId']; $objresult = @mysql_query($sql); if(mysql_num_rows($objresult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $objrow = @mysql_fetch_array($objresult); $objectiveSection = new cvSection("Objective"); $objectiveSection->cvFields[0] = new cvField("",$inputObjects = array(new formInputObject("description","textarea",$objrow[0],100))); $objectiveSection->cvFields[0]->inputObjects[0]->height=20; $objectivePage = new cvPage("objective",array($objectiveSection)); $objectivePage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); $_SESSION['table'] = "objective"; $sql = "SELECT objective.Description FROM objective WHERE ResumeId = ".$_SESSION['ResumeId']; $objresult = @mysql_query($sql); if(mysql_num_rows($objresult)==1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $objrow = @mysql_fetch_array($objresult); $objectiveSection = new cvSection("Objective"); $objectiveSection->cvFields[0] = new cvField("",$inputObjects = array(new formInputObject("description","textarea",$objrow[0],100))); $objectiveSection->cvFields[0]->inputObjects[0]->height=20; $objectivePage = new cvPage("objective",array($objectiveSection)); $objectivePage->display(); ?> \ No newline at end of file diff --git a/page.php b/page.php index 34e8595df2d546fbdca7d4cf2bf39346b28051ad..54c3ae9c651fda613d88f17d03bbd0826c15e6cd 100644 --- a/page.php +++ b/page.php @@ -1 +1 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Title goes here</title> <link rel="stylesheet" href="popup_layout.css" type="text/css" /> <? require("/Library/WebServer/Documents/unlpub/2004sharedcode/2004includes/2004cssselector/cssselect.php"); ?> </head> <body> <div id="header"> <div id="pagehead"> UNL myCV </div> <div id="logo"> <a href="http://www.unl.edu" target="_blank"><img alt="N Icon" src="http://www.unl.edu/unlpub/graphics/n_redsquare.gif" width="37" height="29" /></a> </div> </div> <div id="middle"> <div id="contentContainer"> <div id="content"> blogbody </div> </div> <div id="links"> Links </div> </div> <div id="footer"> footer </div> </body> </html> \ No newline at end of file +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Title goes here</title> <link rel="stylesheet" href="popup_layout.css" type="text/css" /> <?php require("/Library/WebServer/Documents/unlpub/2004sharedcode/2004includes/2004cssselector/cssselect.php"); ?> </head> <body> <div id="header"> <div id="pagehead"> UNL myCV </div> <div id="logo"> <a href="http://www.unl.edu" target="_blank"><img alt="N Icon" src="http://www.unl.edu/unlpub/graphics/n_redsquare.gif" width="37" height="29" /></a> </div> </div> <div id="middle"> <div id="contentContainer"> <div id="content"> blogbody </div> </div> <div id="links"> Links </div> </div> <div id="footer"> footer </div> </body> </html> \ No newline at end of file diff --git a/personal.php b/personal.php index 8f7c55d60f2e761f3733c2e548619a079f793176..04cddd7e892901af620f9858204626729a31a6e2 100644 --- a/personal.php +++ b/personal.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require("cv.functions.php"); $sql = "SELECT * FROM person,usr WHERE usr.PersonId = person.PersonId AND usr.UserId = '".$_SESSION['Login']."'"; $_SESSION['table'] = "person"; $result = @mysql_query($sql); $person = @mysql_fetch_assoc($result); $identificationSection = new cvSection("Identification"); $identificationSection->cvFields[0] = new cvField("Title",$inputObjects = array(new formInputObject("title","text",$person['Title']))); $identificationSection->cvFields[1] = new cvField("First Name",$inputObjects = array(new formInputObject("firstname","text",$person["FirstName"]))); $identificationSection->cvFields[2] = new cvField("Last Name",$inputObjects = array(new formInputObject("lastname","text",$person['LastName']))); $identificationSection->cvFields[3] = new cvField("Date of Birth",$inputObjects = array(new formInputObject("birth","text",$person['Birth']))); $option0['value'] = ''; $option0['label'] = ''; if($person['Gender']=='M') $option1['selected']=true; $option1['value'] = 'M'; $option1['label'] = 'Male'; if($person['Gender']=='F') $option2['selected']=true; $option2['value'] = 'F'; $option2['label'] = 'Female'; $option = array($option0,$option1,$option2); $identificationSection->cvFields[4] = new cvField("Gender",$inputObjects = array(new formOptionObject("gender",$option))); $msoption = optionGenerator("marital_status","Description","MaritalStatusId","Description",$person['MaritalStatusId'],true); $identificationSection->cvFields[5] = new cvField("Marital Status",$inputObjects = array(new formOptionObject("maritalstatusid",$msoption))); $contactSection = new cvSection("Contact Information"); $contactSection->cvFields[0] = new cvField("Email",$inputObjects = array(new formInputObject("email","text",$person['Email']))); $contactSection->cvFields[1] = new cvField("Phone 1",$inputObjects = array(new formInputObject("phone","text",$person['Phone']))); $contactSection->cvFields[2] = new cvField("Phone 2",$inputObjects = array(new formInputObject("phone2","text",$person['Phone2']))); $contactSection->cvFields[3] = new cvField("Mobile",$inputObjects = array(new formInputObject("mobile","text",$person['Mobile']))); $contactSection->cvFields[4] = new cvField("Pager",$inputObjects = array(new formInputObject("pager","text",$person['Pager']))); $addressSection = new cvSection("Residence"); $addressSection->cvFields[0] = new cvField("Street #1",$inputObjects = array(new formInputObject("street","text",$person['Street']))); $addressSection->cvFields[1] = new cvField("Street #2",$inputObjects = array(new formInputObject("street2","text",$person['Street2']))); $addressSection->cvFields[2] = new cvField("City",$inputObjects = array(new formInputObject("city","text",$person['City']))); $addressSection->cvFields[3] = new cvField("State",$inputObjects = array(new formInputObject("state","text",$person['State']))); $coption = optionGenerator("country","Description","CountryId","Description",$person['CountryId'],true,"WHERE Enabled='1'"); $addressSection->cvFields[4] = new cvField("Country",$inputObjects = array(new formOptionObject("countryid",$coption))); $addressSection->cvFields[5] = new cvField("Zip/Postal Code",$inputObjects = array(new formInputObject("zip","text",$person['Zip']))); $personPage = new cvPage("personal",array($identificationSection,$contactSection,$addressSection)); $personPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require("cv.functions.php"); $sql = "SELECT * FROM person,usr WHERE usr.PersonId = person.PersonId AND usr.UserId = '".$_SESSION['Login']."'"; $_SESSION['table'] = "person"; $result = @mysql_query($sql); $person = @mysql_fetch_assoc($result); $identificationSection = new cvSection("Identification"); $identificationSection->cvFields[0] = new cvField("Title",$inputObjects = array(new formInputObject("title","text",$person['Title']))); $identificationSection->cvFields[1] = new cvField("First Name",$inputObjects = array(new formInputObject("firstname","text",$person["FirstName"]))); $identificationSection->cvFields[2] = new cvField("Last Name",$inputObjects = array(new formInputObject("lastname","text",$person['LastName']))); $identificationSection->cvFields[3] = new cvField("Date of Birth",$inputObjects = array(new formInputObject("birth","text",$person['Birth']))); $option0['value'] = ''; $option0['label'] = ''; if($person['Gender']=='M') $option1['selected']=true; $option1['value'] = 'M'; $option1['label'] = 'Male'; if($person['Gender']=='F') $option2['selected']=true; $option2['value'] = 'F'; $option2['label'] = 'Female'; $option = array($option0,$option1,$option2); $identificationSection->cvFields[4] = new cvField("Gender",$inputObjects = array(new formOptionObject("gender",$option))); $msoption = optionGenerator("marital_status","Description","MaritalStatusId","Description",$person['MaritalStatusId'],true); $identificationSection->cvFields[5] = new cvField("Marital Status",$inputObjects = array(new formOptionObject("maritalstatusid",$msoption))); $contactSection = new cvSection("Contact Information"); $contactSection->cvFields[0] = new cvField("Email",$inputObjects = array(new formInputObject("email","text",$person['Email']))); $contactSection->cvFields[1] = new cvField("Phone 1",$inputObjects = array(new formInputObject("phone","text",$person['Phone']))); $contactSection->cvFields[2] = new cvField("Phone 2",$inputObjects = array(new formInputObject("phone2","text",$person['Phone2']))); $contactSection->cvFields[3] = new cvField("Mobile",$inputObjects = array(new formInputObject("mobile","text",$person['Mobile']))); $contactSection->cvFields[4] = new cvField("Pager",$inputObjects = array(new formInputObject("pager","text",$person['Pager']))); $addressSection = new cvSection("Residence"); $addressSection->cvFields[0] = new cvField("Street #1",$inputObjects = array(new formInputObject("street","text",$person['Street']))); $addressSection->cvFields[1] = new cvField("Street #2",$inputObjects = array(new formInputObject("street2","text",$person['Street2']))); $addressSection->cvFields[2] = new cvField("City",$inputObjects = array(new formInputObject("city","text",$person['City']))); $addressSection->cvFields[3] = new cvField("State",$inputObjects = array(new formInputObject("state","text",$person['State']))); $coption = optionGenerator("country","Description","CountryId","Description",$person['CountryId'],true,"WHERE Enabled='1'"); $addressSection->cvFields[4] = new cvField("Country",$inputObjects = array(new formOptionObject("countryid",$coption))); $addressSection->cvFields[5] = new cvField("Zip/Postal Code",$inputObjects = array(new formInputObject("zip","text",$person['Zip']))); $personPage = new cvPage("personal",array($identificationSection,$contactSection,$addressSection)); $personPage->display(); ?> \ No newline at end of file diff --git a/resume.class.php b/resume.class.php index 3a4f92f5c3eb7d64bea1c1719c0d1adb14e605ed..d6504eb19b5d38403f259e99de43688b8b64cec6 100644 --- a/resume.class.php +++ b/resume.class.php @@ -1 +1 @@ -<? /* The classes in this file follow the model of the hr-xml Resume 2.1 specification. (See http://www.hr-xml.org/, Resume 2.1 recommendation) Complex-type elements are classes with other complex-type elements as children, as well as strings etc. Each class has a function, Markup(), which will return that element, and child elements formatted using the markup function specified. Markup functions are xmlMarkup (returns hr-xml resume compliant XML file), and divMarkup (returns XHTML formatted markup similar to the xmlMarkup function, only using html DIV tags for elements and CSS classes used for css styling/identifying). Portions not implemented yet are commented out with //NOTIMPL The sections not implemented usually are waiting mySQL table modifications. */ require_once("jcvDB.php"); ini_set("display_errors",true); $GLOBALS['MarkupFunction'] = "divMarkup"; // If an element has no content, supress it? Should be TRUE for production? $GLOBALS['DisplayEmptyElements'] = false; class Resume { var $ResumeId; var $DistributionGuidelines; var $StructuredXMLResume; var $NonXMLResume; //NOTIMPL var $UserArea; // Constructor for Resume Class - takes as input a UID (LDAP uid) to be searched for in the database. function Resume($uid) { $sql = "SELECT resume.ResumeId ". "FROM resume,usr,person ". "WHERE resume.UserId = usr.UserId AND usr.PersonId=person.PersonId AND person.LDAPUID='{$uid}'"; //usr.UserId='{$uid}'"; $result = @mysql_query($sql); $ResumeId = @mysql_fetch_array($result); // Resume ID is the primary key for this resume in the cv database $this->ResumeId = $ResumeId[0]; mysql_free_result($result); $this->DistributionGuidelines = new DistributionGuidelinesType($this->ResumeId); //$this->StructuredXMLResume = new StructuredXMLResumeType($uid,$this->ResumeId); $this->StructuredXMLResume = new StructuredXMLResumeType($this->ResumeId); $this->NonXMLResume = new NonXMLResumeType($this->ResumeId); //NOTIMPL $this->UserArea = new UserAreaType($this->ResumeId); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("ResumeId",$this->ResumeId); $output .= $this->DistributionGuidelines->Markup(); $output .= $this->StructuredXMLResume->Markup(); $output .= $this->NonXMLResume->Markup(); //NOTIMPL $output .= $this->UserArea->Markup(); $output = $GLOBALS['MarkupFunction']("Resume",$output,array('xmlns:Resume'=>'http://ns.hr-xml.org','xmlns:xsi'=>'http://www.w3.org/2001/XMLSchema-instance','xsi:schemaLocation'=>'http://ns.hr-xml.org Resume.xsd')); /* This was used before the namespaces were added if($GLOBALS['MarkupFunction']=="xmlMarkup") $output .= "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"; */ return $output; } } class StructuredXMLResumeType { var $ContactInfo; var $ExecutiveSummary; var $Objective; var $EmploymentHistory; var $EducationHistory; //NOTIMPL var $LicensesAndCertifications; //NOTIMPL var $MilitaryHistory; //NOTIMPL var $PatentHistory; var $PublicationHistory; //NOTIMPL var $SpeakingEventsHistory; var $Qualifications; //NOTIMPL var $Languages; var $Achievements; var $Associations; var $References; //NOTIMPL var $SecurityCredentials; //NOTIMPL var $ResumeAdditionalItems; var $Comments; var $RevisionDate; function StructuredXMLResumeType($ResumeId) { $sql = "SELECT ". "summary.Description AS ExecutiveSummary ". "FROM summary ". "WHERE ". "summary.SummaryType='S' AND ". "summary.ResumeId=$ResumeId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->ExecutiveSummary = $attributes['ExecutiveSummary']; @mysql_free_result($result); $attributes=$sql=$result=NULL; $sql = "SELECT ". "objective.Description AS Objective ". "FROM objective ". "WHERE ". "objective.ResumeId=$ResumeId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->Objective = $attributes['Objective']; @mysql_free_result($result); $attributes=$sql=$result=NULL; //NOTIMPL $this->Comments = $sql = "SELECT ". "resume.LastUpdated AS RevisionDate ". "FROM resume ". "WHERE ". "resume.ResumeId=$ResumeId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->RevisionDate = $attributes['RevisionDate']; @mysql_free_result($result); $attributes=$sql=$result=NULL; $sql = "SELECT ". "person.PersonId AS PersonId ". "FROM person,usr,resume ". "WHERE ". "person.PersonId = usr.PersonId AND ". "usr.UserId = resume.UserId AND ". "resume.ResumeId = $ResumeId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->ContactInfo = new SEPContactInfoType(new PersonNameType($attributes['PersonId']),new ContactMethodType($attributes['PersonId'])); @mysql_free_result($result); $attributes=$sql=$result=NULL; $this->EmploymentHistory = new EmploymentHistoryType($ResumeId); $this->EducationHistory = new EducationHistoryType($ResumeId); //NOTIMPL $this->LicensesAndCertifications = //NOTIMPL $this->MilitaryHistory = new MilitaryHistoryType($ResumeId); //NOTIMPL $this->PatentHistory = new PatentHistoryType($ResumeId); $this->PublicationHistory = new PublicationHistoryType($ResumeId); //NOTIMPL $this->SpeakingEventsHistory = //NOTIMPL $this->Qualifications = //NOTIMPL $this->Languages = //NOTIMPL $this->Achievements = $this->Associations = array(); $sql = "SELECT ". "membership.MembershipId ". "FROM membership ". "WHERE ". "membership.ResumeId=$ResumeId"; $result = @mysql_query($sql); while ($association = @mysql_fetch_array($result)) $this->Associations[count($this->Associations)] = new AssociationType($association[0]); @mysql_free_result($result); $association=$sql=$result=NULL; $this->References = array(); $sql = "SELECT ". "reference.ReferenceId ". "FROM reference ". "WHERE ". "reference.ResumeId=$ResumeId"; $result = @mysql_query($sql); while ($reference = @mysql_fetch_array($result)) $this->References[count($this->References)] = new ReferenceType($reference[0]); @mysql_free_result($result); $reference=$sql=$result=NULL; //NOTIMPL $this->SecurityCredentials = //NOTIMPL $this->ResumeAdditionalItems = //NOTIMPL $this->SupportingMaterals = new SupportingMaterialsType($ResumeId); } function Markup() { $output = $GLOBALS['MarkupFunction']("ContactInfo",$this->ContactInfo->Markup()); $output .= $GLOBALS['MarkupFunction']("ExecutiveSummary",$this->ExecutiveSummary); $output .= $GLOBALS['MarkupFunction']("Objective",$this->Objective); $output .= $this->EmploymentHistory->Markup(); $output .= $this->EducationHistory->Markup(); //NOTIMPL $output .= $this->LicensesAndCertifications->Markup(); //NOTIMPL $output .= $this->MilitaryHistory->Markup(); //NOTIMPL $output .= $this->PatentHistory->Markup(); $output .= $this->PublicationHistory->Markup(); //NOTIMPL $output .= $this->SpeakingEventsHistory->Markup(); //NOTIMPL $output .= $this->Qualifications->Markup(); //NOTIMPL $output .= $this->Languages->Markup(); //NOTIMPL $output .= $this->Achievements->Markup(); $associations = ""; for($i=0;$i<count($this->Associations);$i++) $associations .= $this->Associations[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Associations",$associations); $associations = NULL; $references = ""; for($i=0;$i<count($this->References);$i++) $references .= $this->References[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("References",$references); $references = NULL; //NOTIMPL $output .= $this->SecurityCredentials->Markup(); //NOTIMPL $output .= $this->ResumeAdditionalItems->Markup(); //NOTIMPL $output .= $this->SupportingMaterials->Markup(); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); $output .= $GLOBALS['MarkupFunction']("RevisionDate",$this->RevisionDate); return $GLOBALS['MarkupFunction']("StructuredXMLResume",$output); } } class NonXMLResumeType { var $TextResume; var $LinkToResume;//DEP var $SupportingMaterials = array(); var $Comments; function NonXMLResumeType() { $this->TextResume = ''; $this->LinkToResume = ''; $this->SupportingMaterials = array(); $this->Comments = ''; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("TextResume",$this->TextResume); $output .= $GLOBALS['MarkupFunction']("LinkToResume",$this->LinkToResume);//DEP //NOTIMPL $output .= $this->SupportingMaterials[]->Markup(); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); return $GLOBALS['MarkupFunction']("NONXMLResume",$output); } } class SEPContactInfoType { var $PersonName; var $ContactMethod = array(); function SEPContactInfoType($PersonName,$ContactMethod) { $this->PersonName = $PersonName; $this->ContactMethod = $ContactMethod; } function Markup() { $output = ""; $output .= $this->PersonName->Markup(); $output .= $this->ContactMethod->Markup(); return $output; } } class PersonNameType { var $FormattedName; var $LegalName; var $GivenName; var $PreferredGivenName; var $MiddleName; var $FamilyName; var $MarkupId;//This allows changing the markup ID for a PersonName:Specifically Publication Authors require markup ID of 'Name' NOT 'PersonName' function PersonNameType($PersonId,$MarkupId="PersonName") { $sql = "SELECT ". "person.FirstName AS GivenName, ". "person.MiddleName AS MiddleName, ". "person.LastName AS FamilyName ". "FROM ". "person ". "WHERE ". "person.PersonId=$PersonId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->GivenName = $attributes['GivenName']; $this->FamilyName = $attributes['FamilyName']; $this->MiddleName = $attributes['MiddleName']; @mysql_free_result($result); $attributes=$sql=$result=NULL; $this->MarkupId=$MarkupId; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("FamilyName",$this->FamilyName); $output .= $GLOBALS['MarkupFunction']("GivenName",$this->GivenName); $formattedName = $this->GivenName; ($this->MiddleName) ? $formattedName .= " ".$this->MiddleName." " : $formattedName.= " "; $formattedName .= $this->FamilyName; $output .= $GLOBALS['MarkupFunction']("FormattedName",$formattedName); return $GLOBALS['MarkupFunction']($this->MarkupId,$output); } } class EmploymentHistoryType { var $EmployerOrg = array(); function EmploymentHistoryType($ResumeId) { $this->EmployerOrg = array(); $sql = "SELECT ". "organization.Name AS OrgName, ". "organization.City AS Municipality, ". "organization.Zip AS PostalCode, ". "organization.State AS Region, ". "employment.EmploymentId AS EmploymentId ". "FROM ". "organization,employment ". "WHERE ". "employment.EmployerId=organization.OrganizationId AND ". "employment.ResumeId = $ResumeId ". "GROUP BY employment.EmploymentId"; $result = @mysql_query($sql); while($attributes = @mysql_fetch_assoc($result)) { $temp = new EmployerOrgType(); $temp->EmployerOrgName = $attributes['OrgName']; $temp->EmployerContactInfo->LocationSummary->Municipality = $attributes['Municipality']; $temp->EmployerContactInfo->LocationSummary->PostalCode = $attributes['PostalCode']; $temp->EmployerContactInfo->LocationSummary->Region = $attributes['Region']; $sql = "SELECT ". "role.Description AS positionType,". "job.Title AS Title,". "DATE_FORMAT(job.StartDate,'%Y-%m') AS StartDate,". "DATE_FORMAT(job.EndDate,'%Y-%m') AS EndDate,". "job.Description AS Description,". "organization.Name AS OrganizationName ". "FROM ". "job,role,organization ". "WHERE ". "job.OrganizationId=organization.OrganizationId AND ". "job.RoleId=role.RoleId AND ". "job.EmploymentId = {$attributes['EmploymentId']} ". "GROUP BY job.JobId"; $tempResult = @mysql_query($sql); $i=0; while($position = @mysql_fetch_assoc($tempResult)) { $temp->PositionHistory[$i] = new PositionHistoryType(); $temp->PositionHistory[$i]->positionType=$position['positionType']; $temp->PositionHistory[$i]->Title=$position['Title']; $temp->PositionHistory[$i]->OrgName->OrganizationName=$position['OrganizationName']; $temp->PositionHistory[$i]->StartDate=$position['StartDate']; $temp->PositionHistory[$i]->EndDate=$position['EndDate']; $temp->PositionHistory[$i]->Description=$position['Description']; $i++; } @mysql_free_result($tempResult); $this->EmployerOrg[count($this->EmployerOrg)] = $temp; $temp = NULL; } @mysql_free_result($result); $attributes=$result=$sql=NULL; } function Markup() { $output = ""; for($i=0;$i<count($this->EmployerOrg);$i++) $output .= $this->EmployerOrg[$i]->Markup(); return $GLOBALS['MarkupFunction']("EmploymentHistory",$output); } } class EmployerOrgType { var $employerOrgType; var $EmployerOrgName; var $EmployerContactInfo; var $PositionHistory; var $UserArea; function EmployerOrgType() { $this->EmployerContactInfo = new EmployerContactInfoType(); $this->PositionHistory = array(); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("EmployerOrgName",$this->EmployerOrgName); $output .= $this->EmployerContactInfo->Markup(); for($i=0;$i<count($this->PositionHistory);$i++) $output .= $this->PositionHistory[$i]->Markup(); //NOTIMPL $output .= $this->UserArea->Markup(); return $GLOBALS['MarkupFunction']("EmployerOrg",$output); } } class EmployerContactInfoType { var $contactType; var $PersonName; var $ContactMethod; var $LocationSummary; var $InternetDomainName; function EmployerContactInfoType() { //NOTIMPL $this->ContactMethod = new ContactMethodType(); $this->LocationSummary = new LocationSummaryType(); } function Markup() { $output = ""; $output .= $this->LocationSummary->Markup(); return $GLOBALS['MarkupFunction']("EmployerContactInfo",$output); } } class LocationSummaryType { var $Municipality; var $Region; var $PostalCode; function LocationSummaryType() { } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("Municipality",$this->Municipality); $output .= $GLOBALS['MarkupFunction']("Region",$this->Region); $output .= $GLOBALS['MarkupFunction']("PostalCode",$this->PostalCode); return $GLOBALS['MarkupFunction']("LocationSummary",$output); } } class PositionHistoryType { var $Title; var $OrgName; var $OrgInfo; var $OrgIndustry; var $OrgSize; var $Description; var $StartDate; var $EndDate; var $Compensation; var $Comments; var $Verification; var $JobLevelInfo; var $JobCategory; var $Competency; var $UserArea; function PositionHistoryType() { $this->OrgName=new PositionOrgNameType(); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); $output .= $this->OrgName->Markup(); $output .= $GLOBALS['MarkupFunction']("Description",$this->Description); $output .= $GLOBALS['MarkupFunction']("StartDate",$GLOBALS['MarkupFunction']("YearMonth",$this->StartDate)); $output .= $GLOBALS['MarkupFunction']("EndDate",$GLOBALS['MarkupFunction']("YearMonth",$this->EndDate)); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Compensation",$this->Compensation); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Verification",$this->Verification); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("JobLevelInfo",$this->JobLevelInfo); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("JobCategory",$this->JobCategory); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Competency",$this->Competency); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("UserArea",$this->UserArea); return $GLOBALS['MarkupFunction']("PositionHistory",$output); } } class PositionOrgNameType { //NOTIMPL var $organizationType; var $OrganizationName; function PositionOrgNameType() { } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("OrganizationName",$this->OrganizationName); return $GLOBALS['MarkupFunction']("OrgName",$output); } } class EducationHistoryType { var $SchoolOrInstitution = array(); function EducationHistoryType($ResumeId) { $this->SchoolOrInstitution = array(); $sql = "SELECT education.EducationId FROM education WHERE education.ResumeId={$ResumeId}"; $result = @mysql_query($sql); while($EducationId = @mysql_fetch_array($result)) $this->SchoolOrInstitution[count($this->SchoolOrInstitution)]=new SchoolOrInstitutionType($EducationId[0]); @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->SchoolOrInstitution);$i++) $output .= $this->SchoolOrInstitution[$i]->Markup(); return $GLOBALS['MarkupFunction']("EducationHistory",$output); } } class SchoolOrInstitutionType { var $schoolType; var $School; var $LocationSummary; var $PostalAddress; var $OrganizationUnit; var $Degree = array(); function SchoolOrInstitutionType($EducationId) { $this->LocationSummary = new LocationSummaryType(); //NOTIMPL $this->PostalAddress = new PostalAddressType(); $sql = "SELECT organization.Name ". "FROM organization,education ". "WHERE organization.OrganizationId=education.OrganizationId AND education.EducationId = {$EducationId}"; $Organization = mysql_fetch_array(mysql_query($sql)); $this->School = new SchoolNameType($Organization[0]); $sql = "SELECT degree.DegreeId FROM degree WHERE degree.EducationId={$EducationId}"; $result = @mysql_query($sql); while($degree = @mysql_fetch_array($result)) { $this->Degree[count($this->Degree)] = new EduDegreeType($degree[0]); } @mysql_free_result($result); } function Markup() { $output = ""; $output .= $this->School->Markup(); $output .= $this->LocationSummary->Markup(); //NOTIMPL $output .= $this->PostalAddress->Markup(); $output .= $GLOBALS['MarkupFunction']("OrganizationUnit",$this->OrganizationUnit); for($i=0;$i<count($this->Degree);$i++) $output .= $this->Degree[$i]->Markup(); return $GLOBALS['MarkupFunction']("SchoolOrInstitutionType",$output); } } class EduDegreeType { var $DegreeName; var $DegreeDate; var $OtherHonors; var $DegreeMajor; var $DegreeMinor; var $DegreeMeasure; var $DatesOfAttendance; var $Comments; var $UserArea; function EduDegreeType($DegreeId) { $sql = "SELECT * ". "FROM degree ". "WHERE degree.DegreeId = $DegreeId"; $result = @mysql_query($sql); $Degree = @mysql_fetch_assoc($result); $this->DegreeName = $Degree['Name']; $this->DegreeDate = $Degree['DegreeDate']; //NOTIMPL $this->OtherHonors = $Degree['OtherHonors']; //NOTIMPL $this->DegreeMajor = $Degree['Major']; //NOTIMPL $this->DegreeMinor = $Degree['Minor']; //NOTIMPL $this->DegreeMeasure = new DegreeMeasureType(); $this->DatesOfAttendance = new DatesOfAttendancetype($Degree['StartDate'],$Degree['EndDate']); $this->Comments = $Degree['Comments']; //NOTIMPL $this->UserArea = new UserAreaType(); @mysql_free_result($result); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("DegreeName",$this->DegreeName); $output .= $GLOBALS['MarkupFunction']("DegreeDate",$this->DegreeDate); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("OtherHonors",$this->OtherHonors); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("DegreeMajor",$this->DegreeMajor); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("DegreeMinor",$this->DegreeMinor); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("DegreeMeasure",$this->DegreeMeasure); $output .= $this->DatesOfAttendance->Markup(); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); //NOTIMPL $output .= $this->UserArea->Markup(); return $GLOBALS['MarkupFunction']("Degree",$output); } } class SchoolNameType { var $InternetDomainName; var $SchoolId; var $SchoolName; function SchoolNameType($SchoolName) { $this->SchoolName = $SchoolName; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("InternetDomainName",$this->InternetDomainName); $output .= $GLOBALS['MarkupFunction']("SchoolId",$this->SchoolId); $output .= $GLOBALS['MarkupFunction']("SchoolName",$this->SchoolName); return $GLOBALS['MarkupFunction']("SchoolNameType",$output); } } class DatesOfAttendanceType { var $StartDate; var $EndDate; function DatesOfAttendanceType($StartDate,$EndDate) { $this->StartDate = $StartDate; $this->EndDate = $EndDate; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("StartDate",$this->StartDate); $output .= $GLOBALS['MarkupFunction']("EndDate",$this->EndDate); return $GLOBALS['MarkupFunction']("DatesOfAttendanceType",$output); } } class AssociationType { var $type; var $Name; var $Id; var $Link; var $StartDate; var $EndDate; //NOTIMPL var $Role; var $Comments; function AssociationType($MembershipId) { $sql = "SELECT ". "membership.*,". "organization.Name AS Name ". "FROM membership,organization ". "WHERE ". "membership.OrganizationId = organization.OrganizationId AND ". "MembershipId=$MembershipId"; $result=@mysql_query($sql); $association=@mysql_fetch_assoc($result); $this->type = "Professional"; $this->Name = $association['Name']; //NOTIMPL $this->Id = //NOTIMPL $this->Link = $association['Link']; $this->StartDate = $association['StartDate']; $this->EndDate = $association['EndDate']; //NOTIMPL $this->Role = $this->Comments = $association['Description']; @mysql_free_result($result); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("Name",$this->Name); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Id",$this->Id); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); $output .= $GLOBALS['MarkupFunction']("StartDate",$this->StartDate); $output .= $GLOBALS['MarkupFunction']("EndDate",$this->EndDate); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); return $GLOBALS['MarkupFunction']("Association",$output); } } class PublicationHistoryType { var $FormattedPublicationDescription; var $Article = array(); var $Book = array(); var $ConferencePaper = array(); var $OtherPublication = array(); function PublicationHistoryType($ResumeId) { $sql = "SELECT publication_type.Description,publication.PublicationId ". "FROM publication,publication_type ". "WHERE ". "publication.PublicationTypeId = publication_type.PublicationTypeId AND ". "publication.ResumeId={$ResumeId}"; $result = @mysql_query($sql); while ($Publication = @mysql_fetch_array($result)) { switch($Publication[0]) { case "Article": $this->Article[count($this->Article)] = new ArticleType($Publication[1]); break; case "Book": $this->Book[count($this->Book)] = new BookType($Publication[1]); break; case "ConferencePaper": $this->ConferencePaper[count($this->ConferencePaper)] = new ConferencePaperType($Publication[1]); break; default: $this->OtherPublication[count($this->OtherPublication)] = new OtherPublicationType($Publication[1]); } } @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->Article);$i++) $output .= $this->Article[$i]->Markup(); for($i=0;$i<count($this->Book);$i++) $output .= $this->Book[$i]->Markup(); for($i=0;$i<count($this->ConferencePaper);$i++) $output .= $this->ConferencePaper[$i]->Markup(); for($i=0;$i<count($this->OtherPublication);$i++) $output .= $this->OtherPublication[$i]->Markup(); return $GLOBALS['MarkupFunction']("PublicationHistory",$output); } } class ContactMethodType { var $Use; var $Location; var $WhenAvailable; var $Telephone; var $Mobile; var $Fax; var $Pager; var $TTYTDD; var $InternetEmailAddress; var $InternetWebAddress; var $PostalAddress; function ContactMethodType($PersonId) { $sql = "SELECT ". "person.Phone AS Telephone, ". "person.Mobile AS Mobile, ". "person.Fax AS Fax, ". "person.Pager AS Pager, ". "person.Email AS InternetEmailAddress ". "FROM ". "person,usr,resume ". "WHERE ". "person.PersonId = $PersonId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->Telephone = $attributes['Telephone']; $this->Mobile = $attributes['Mobile']; $this->Fax = $attributes['Fax']; $this->Pager = $attributes['Pager']; $this->InternetEmailAddress = $attributes['InternetEmailAddress']; $this->PostalAddress = new PostalAddressType($PersonId); @mysql_free_result($result); $attributes=$sql=$result=NULL; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("Telephone",$this->Telephone); $output .= $GLOBALS['MarkupFunction']("Mobile",$this->Mobile); $output .= $GLOBALS['MarkupFunction']("Fax",$this->Fax); $output .= $GLOBALS['MarkupFunction']("Pager",$this->Pager); $output .= $GLOBALS['MarkupFunction']("InternetEmailAddress",$this->InternetEmailAddress); $output .= $this->PostalAddress->Markup(); return $GLOBALS['MarkupFunction']("ContactMethod",$output); } } class PostalAddressType { var $type; var $CountryCode; var $PostalCode; var $Region; var $Municipality; var $DeliveryAddress; var $Recipient; function PostalAddressType($PersonId) { $sql = "SELECT ". "person.Street AS Street, ". "person.Street2 AS Street2, ". "person.City AS City, ". "person.State AS State, ". "person.Zip AS Zip, ". "person.CountryId AS CountryCode ". "FROM person ". "WHERE person.PersonId=$PersonId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->CountryCode = strtoupper($attributes['CountryCode']); $this->PostalCode = $attributes['Zip']; $this->Region = $attributes['State']; $this->Municipality = $attributes['City']; $this->DeliveryAddress = new DeliveryAddress($attributes['Street']); //NOTIMPL $this->Recipient = @mysql_free_result($result); $attributes=$sql=$result=NULL; } function Markup() { $output = ""; $output .= $this->DeliveryAddress->Markup(); $output .= $GLOBALS['MarkupFunction']("CountryCode",$this->CountryCode); $output .= $GLOBALS['MarkupFunction']("Municipality",$this->Municipality); $output .= $GLOBALS['MarkupFunction']("Region",$this->Region); $output .= $GLOBALS['MarkupFunction']("PostalCode",$this->PostalCode); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Recipient",$this->Recipient); return $GLOBALS['MarkupFunction']("PostalAddress",$output); } } class DeliveryAddress { var $AddressLine; var $StreetName; var $BuildingNumber; var $Unit; var $PostOfficeBox; function DeliveryAddress($AddressLine) { $this->AddressLine = $AddressLine; //NOTIMPL $this->StreetName = $StreetName; //NOTIMPL $this->BuildingNumber = $BuildingNumber; //NOTIMPL $this->Unit = $Unit; //NOTIMPL $this->PostOfficeBox = $PostOfficeBox; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("AddressLine",$this->AddressLine); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("StreetName",$this->StreetName); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("BuildingNumber",$this->BuildingNumber); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Unit",$this->Unit); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("PostOfficeBox",$this->PostOfficeBox); return $GLOBALS['MarkupFunction']("DeliveryAddress",$output); } } class BasicBibliographicRecordType { var $Title; var $Name; var $PublicationDate; var $Link; var $Abstract; var $Copyright; var $Comments; function BasicBibliographicRecordType($PublicationId) { $this->Name = array(); $sql = "SELECT person.PersonId AS PersonId ". "FROM publication_author,author,person ". "WHERE ". "author.PersonId = person.PersonId AND ". "publication_author.AuthorId = author.AuthorId AND ". "publication_author.PublicationId = $PublicationId"; $authors = @mysql_query($sql); while($author = @mysql_fetch_array($authors)) { $this->Name[count($this->Name)] = new PersonNameType($author[0],"Name"); } @mysql_free_result($authors); } } class ArticleType extends BasicBibliographicRecordType { //NOTIMPL var $JournalOrSerialName; //NOTIMPL var $ISSN; //NOTIMPL var $Volume; //NOTIMPL var $Issue; var $PageNumber; //NOTIMPL var $PublicationLanguage; function ArticleType($PublicationId) { parent::BasicBiblioGraphicRecordType($PublicationId);//Constructor for parent class is called to setup Names! $sql = "SELECT * FROM publication WHERE PublicationId = $PublicationId"; $result = @mysql_query($sql); $Publication = @mysql_fetch_assoc($result); $this->Title = $Publication['Title']; $this->PublicationDate = $Publication['PublishDate']; $this->Link = $Publication['URL']; //NOTOMPL $this->Abstract = $Publication['Abstract']; //NOTOMPL $this->Copyright = $Publication['Copyright']; //NOTOMPL $this->Comments = $Publication['Comments']; $this->JournalOrSerialName = $Publication['Publisher']; //NOTOMPL $this->ISSN = $Publication['ISSN']; //NOTIMPL $this->Volume = $Publication['Volume']; //NOTOMPL $this->Issue = $Publication['Issue']; $this->PageNumber = $Publication['PageNums']; //NOTOMPL $this->PublicationLanguage = $Publication['PublicationLanguage']; @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->Name);$i++) $output .= $this->Name[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); $output .= $GLOBALS['MarkupFunction']("JournalOrSerialName",$this->JournalOrSerialName); $output .= $GLOBALS['MarkupFunction']("PublicationDate",$this->PublicationDate); $output .= $GLOBALS['MarkupFunction']("PageNumber",$this->PageNumber); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Abstract",$this->Abstract); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Copyright",$this->Copyright); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISSN",$this->ISSN); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Volume",$this->Volume); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Issue",$this->Issue); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("PublicationLanguage",$this->PublicationLanguage); return $GLOBALS['MarkupFunction']("Article",$output); } } class BookType extends BasicBibliographicRecordType { var $Edition; var $Chapter; var $ISSN; var $ISBN; var $NumberOfPages; var $PublisherName; var $PublisherLocation; function BookType($PublicationId) { parent::BasicBiblioGraphicRecordType($PublicationId);//Constructor for parent class is called to setup Names! $sql = "SELECT * FROM publication WHERE PublicationId = $PublicationId"; $result = @mysql_query($sql); $Publication = @mysql_fetch_assoc($result); $this->Title = $Publication['Title']; $this->PublicationDate = $Publication['PublishDate']; $this->Link = $Publication['URL']; //NOTOMPL $this->Abstract = $Publication['Abstract']; //NOTOMPL $this->Copyright = $Publication['Copyright']; //NOTOMPL $this->Comments = $Publication['Comments']; //NOTIMPL $this->Edition = $Publication['Edition']; //NOTIMPL $this->Chapter = $Publication['Chapter']; //NOTOMPL $this->ISSN = $Publication['ISSN']; //NOTOMPL $this->ISBN = $Publication['ISBN']; $this->NumberOfPages = $Publication['PageNums']; $this->PublisherName = $Publication['Publisher']; //NOTOMPL $this->PublisherLocation = $Publication['PublisherLocation']; @mysql_free_result($result); } function Markup() { /* The markup function for BOOK has a modified order to assist in displaying the book info in MLA format. */ $output = ""; for($i=0;$i<count($this->Name);$i++) $output .= $this->Name[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("PublisherLocation",$this->PublisherLocation); $output .= $GLOBALS['MarkupFunction']("PublisherName",$this->PublisherName); $output .= $GLOBALS['MarkupFunction']("PublicationDate",$this->PublicationDate); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Abstract",$this->Abstract); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Copyright",$this->Copyright); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Edition",$this->Edition); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Chapter",$this->Chapter); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISSN",$this->ISSN); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISBN",$this->ISBN); $output .= $GLOBALS['MarkupFunction']("NumberOfPages",$this->NumberOfPages); return $GLOBALS['MarkupFunction']("Book",$output); } } class ConferencePaperType extends BasicBibliographicRecordType { var $EventName; var $ConferenceDate; var $ConferenceLocation; function ConferencePaperType($PublicationId) { parent::BasicBiblioGraphicRecordType($PublicationId);//Constructor for parent class is called to setup Names! $sql = "SELECT * FROM publication WHERE PublicationId = $PublicationId"; $result = @mysql_query($sql); $Publication = @mysql_fetch_assoc($result); $this->Title = $Publication['Title']; $this->PublicationDate = $Publication['PublishDate']; $this->Link = $Publication['URL']; //NOTOMPL $this->Abstract = $Publication['Abstract']; //NOTOMPL $this->Copyright = $Publication['Copyright']; //NOTOMPL $this->Comments = $Publication['Comments']; @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->Name);$i++) $output .= $this->Name[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); $output .= $GLOBALS['MarkupFunction']("PublicationDate",$this->PublicationDate); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Abstract",$this->Abstract); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Copyright",$this->Copyright); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); return $GLOBALS['MarkupFunction']("ConferencePaper",$output); } } class OtherPublicationType extends BasicBibliographicRecordType { var $ISSN; var $ISBN; var $NumberOfPages; var $PublisherName; var $PublisherLocation; function OtherPublicationtype($PublicationId) { parent::BasicBiblioGraphicRecordType($PublicationId);//Constructor for parent class is called to setup Names! $sql = "SELECT * FROM publication WHERE PublicationId = $PublicationId"; $result = @mysql_query($sql); $Publication = @mysql_fetch_assoc($result); $this->Title = $Publication['Title']; $this->PublicationDate = $Publication['PublishDate']; $this->Link = $Publication['URL']; //NOTOMPL $this->Abstract = $Publication['Abstract']; //NOTOMPL $this->Copyright = $Publication['Copyright']; //NOTOMPL $this->Comments = $Publication['Comments']; //NOTOMPL $this->ISSN = $Publication['ISSN']; //NOTOMPL $this->ISBN = $Publication['ISBN']; $this->NumberOfPages = $Publication['PageNums']; $this->PublisherName = $Publication['Publisher']; //NOTOMPL $this->PublisherLocation = $Publication['PublisherLocation']; @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->Name);$i++) $output .= $this->Name[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); $output .= $GLOBALS['MarkupFunction']("PublisherName",$this->PublisherName); $output .= $GLOBALS['MarkupFunction']("PublicationDate",$this->PublicationDate); $output .= $GLOBALS['MarkupFunction']("NumberOfPages",$this->NumberOfPages); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Abstract",$this->Abstract); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Copyright",$this->Copyright); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISSN",$this->ISSN); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISBN",$this->ISBN); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("PublisherLocation",$this->PublisherLocation); return $GLOBALS['MarkupFunction']("OtherPublicationType",$output); } } class DistributionGuidelinesType { var $DistributeTo; var $DoNotDistribute; function DistributionGuidelinesType($ResumeId) { $this->DistributeTo = array(); $this->DoNotDistribute = array(); } function Markup() { $output = ""; return $GLOBALS['MarkupFunction']("DistributionGuidelines",$output); } } class DistributionType { var $validFrom; var $validTo; var $Id; var $Name; function DistributionType($Id,$Name,$validFrom,$validTo) { $this->Id = $Id; $this->Name = $Name; $this->validFrom = $validFrom; $this->validTo = $validTo; } function Markup() { //echo "Displaying DistributionType"; } } class ReferenceType { var $type; var $PersonName; var $PositionTitle; var $ContactMethod; var $Comments; function ReferenceType($ReferenceId) { $sql = "SELECT reference.PersonId AS PersonId FROM reference WHERE ReferenceId=$ReferenceId"; $result = @mysql_query($sql); $reference = @mysql_fetch_assoc($result); $this->PersonName = new PersonNameType($reference['PersonId']); //NOTIMPL $this->PositionTitle = $reference['PositionTitle']; $this->ContactMethod = new ContactMethodType($reference['PersonId']); //$this->Comments = $reference['Comments']; @mysql_free_result($result); } function Markup() { $output = ""; $output .= $this->PersonName->Markup(); $output .= $GLOBALS['MarkupFunction']("PositionTitle",$this->PositionTitle); $output .= $this->ContactMethod->Markup(); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); return $GLOBALS['MarkupFunction']("Reference",$output); } } function divMarkup($id,$content,$attributes=array()) { /* Nothing is done with the attributes array... it is simply there for easily switching between xmlMarkup and divMarkup */ if($content == "" && $GLOBALS['DisplayEmptyElements']==false) return ""; else return "\n<div class='$id'>$content</div>\n"; } function xmlMarkup($id,$content,$attributes=array()) { if($content == "" && $GLOBALS['DisplayEmptyElements']==false) return ""; else { $output = ""; $output .= "\n<$id"; foreach ($attributes as $attribute => $value) $output.= " $attribute=\"$value\""; $output .= ">$content</$id>\n"; return $output; } } /* $resume = new Resume("s-bbieber1"); header("Content-type: text/xml"); echo $resume->Markup(); */ ?> \ No newline at end of file +<?php /* The classes in this file follow the model of the hr-xml Resume 2.1 specification. (See http://www.hr-xml.org/, Resume 2.1 recommendation) Complex-type elements are classes with other complex-type elements as children, as well as strings etc. Each class has a function, Markup(), which will return that element, and child elements formatted using the markup function specified. Markup functions are xmlMarkup (returns hr-xml resume compliant XML file), and divMarkup (returns XHTML formatted markup similar to the xmlMarkup function, only using html DIV tags for elements and CSS classes used for css styling/identifying). Portions not implemented yet are commented out with //NOTIMPL The sections not implemented usually are waiting mySQL table modifications. */ require_once("jcvDB.php"); ini_set("display_errors",true); $GLOBALS['MarkupFunction'] = "divMarkup"; // If an element has no content, supress it? Should be TRUE for production? $GLOBALS['DisplayEmptyElements'] = false; class Resume { var $ResumeId; var $DistributionGuidelines; var $StructuredXMLResume; var $NonXMLResume; //NOTIMPL var $UserArea; // Constructor for Resume Class - takes as input a UID (LDAP uid) to be searched for in the database. function Resume($uid) { $sql = "SELECT resume.ResumeId ". "FROM resume,usr,person ". "WHERE resume.UserId = usr.UserId AND usr.PersonId=person.PersonId AND person.LDAPUID='{$uid}'"; //usr.UserId='{$uid}'"; $result = @mysql_query($sql); $ResumeId = @mysql_fetch_array($result); // Resume ID is the primary key for this resume in the cv database $this->ResumeId = $ResumeId[0]; mysql_free_result($result); $this->DistributionGuidelines = new DistributionGuidelinesType($this->ResumeId); //$this->StructuredXMLResume = new StructuredXMLResumeType($uid,$this->ResumeId); $this->StructuredXMLResume = new StructuredXMLResumeType($this->ResumeId); $this->NonXMLResume = new NonXMLResumeType($this->ResumeId); //NOTIMPL $this->UserArea = new UserAreaType($this->ResumeId); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("ResumeId",$this->ResumeId); $output .= $this->DistributionGuidelines->Markup(); $output .= $this->StructuredXMLResume->Markup(); $output .= $this->NonXMLResume->Markup(); //NOTIMPL $output .= $this->UserArea->Markup(); $output = $GLOBALS['MarkupFunction']("Resume",$output,array('xmlns:Resume'=>'http://ns.hr-xml.org','xmlns:xsi'=>'http://www.w3.org/2001/XMLSchema-instance','xsi:schemaLocation'=>'http://ns.hr-xml.org Resume.xsd')); /* This was used before the namespaces were added if($GLOBALS['MarkupFunction']=="xmlMarkup") $output .= "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"; */ return $output; } } class StructuredXMLResumeType { var $ContactInfo; var $ExecutiveSummary; var $Objective; var $EmploymentHistory; var $EducationHistory; //NOTIMPL var $LicensesAndCertifications; //NOTIMPL var $MilitaryHistory; //NOTIMPL var $PatentHistory; var $PublicationHistory; //NOTIMPL var $SpeakingEventsHistory; var $Qualifications; //NOTIMPL var $Languages; var $Achievements; var $Associations; var $References; //NOTIMPL var $SecurityCredentials; //NOTIMPL var $ResumeAdditionalItems; var $Comments; var $RevisionDate; function StructuredXMLResumeType($ResumeId) { $sql = "SELECT ". "summary.Description AS ExecutiveSummary ". "FROM summary ". "WHERE ". "summary.SummaryType='S' AND ". "summary.ResumeId=$ResumeId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->ExecutiveSummary = $attributes['ExecutiveSummary']; @mysql_free_result($result); $attributes=$sql=$result=NULL; $sql = "SELECT ". "objective.Description AS Objective ". "FROM objective ". "WHERE ". "objective.ResumeId=$ResumeId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->Objective = $attributes['Objective']; @mysql_free_result($result); $attributes=$sql=$result=NULL; //NOTIMPL $this->Comments = $sql = "SELECT ". "resume.LastUpdated AS RevisionDate ". "FROM resume ". "WHERE ". "resume.ResumeId=$ResumeId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->RevisionDate = $attributes['RevisionDate']; @mysql_free_result($result); $attributes=$sql=$result=NULL; $sql = "SELECT ". "person.PersonId AS PersonId ". "FROM person,usr,resume ". "WHERE ". "person.PersonId = usr.PersonId AND ". "usr.UserId = resume.UserId AND ". "resume.ResumeId = $ResumeId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->ContactInfo = new SEPContactInfoType(new PersonNameType($attributes['PersonId']),new ContactMethodType($attributes['PersonId'])); @mysql_free_result($result); $attributes=$sql=$result=NULL; $this->EmploymentHistory = new EmploymentHistoryType($ResumeId); $this->EducationHistory = new EducationHistoryType($ResumeId); //NOTIMPL $this->LicensesAndCertifications = //NOTIMPL $this->MilitaryHistory = new MilitaryHistoryType($ResumeId); //NOTIMPL $this->PatentHistory = new PatentHistoryType($ResumeId); $this->PublicationHistory = new PublicationHistoryType($ResumeId); //NOTIMPL $this->SpeakingEventsHistory = //NOTIMPL $this->Qualifications = //NOTIMPL $this->Languages = //NOTIMPL $this->Achievements = $this->Associations = array(); $sql = "SELECT ". "membership.MembershipId ". "FROM membership ". "WHERE ". "membership.ResumeId=$ResumeId"; $result = @mysql_query($sql); while ($association = @mysql_fetch_array($result)) $this->Associations[count($this->Associations)] = new AssociationType($association[0]); @mysql_free_result($result); $association=$sql=$result=NULL; $this->References = array(); $sql = "SELECT ". "reference.ReferenceId ". "FROM reference ". "WHERE ". "reference.ResumeId=$ResumeId"; $result = @mysql_query($sql); while ($reference = @mysql_fetch_array($result)) $this->References[count($this->References)] = new ReferenceType($reference[0]); @mysql_free_result($result); $reference=$sql=$result=NULL; //NOTIMPL $this->SecurityCredentials = //NOTIMPL $this->ResumeAdditionalItems = //NOTIMPL $this->SupportingMaterals = new SupportingMaterialsType($ResumeId); } function Markup() { $output = $GLOBALS['MarkupFunction']("ContactInfo",$this->ContactInfo->Markup()); $output .= $GLOBALS['MarkupFunction']("ExecutiveSummary",$this->ExecutiveSummary); $output .= $GLOBALS['MarkupFunction']("Objective",$this->Objective); $output .= $this->EmploymentHistory->Markup(); $output .= $this->EducationHistory->Markup(); //NOTIMPL $output .= $this->LicensesAndCertifications->Markup(); //NOTIMPL $output .= $this->MilitaryHistory->Markup(); //NOTIMPL $output .= $this->PatentHistory->Markup(); $output .= $this->PublicationHistory->Markup(); //NOTIMPL $output .= $this->SpeakingEventsHistory->Markup(); //NOTIMPL $output .= $this->Qualifications->Markup(); //NOTIMPL $output .= $this->Languages->Markup(); //NOTIMPL $output .= $this->Achievements->Markup(); $associations = ""; for($i=0;$i<count($this->Associations);$i++) $associations .= $this->Associations[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Associations",$associations); $associations = NULL; $references = ""; for($i=0;$i<count($this->References);$i++) $references .= $this->References[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("References",$references); $references = NULL; //NOTIMPL $output .= $this->SecurityCredentials->Markup(); //NOTIMPL $output .= $this->ResumeAdditionalItems->Markup(); //NOTIMPL $output .= $this->SupportingMaterials->Markup(); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); $output .= $GLOBALS['MarkupFunction']("RevisionDate",$this->RevisionDate); return $GLOBALS['MarkupFunction']("StructuredXMLResume",$output); } } class NonXMLResumeType { var $TextResume; var $LinkToResume;//DEP var $SupportingMaterials = array(); var $Comments; function NonXMLResumeType() { $this->TextResume = ''; $this->LinkToResume = ''; $this->SupportingMaterials = array(); $this->Comments = ''; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("TextResume",$this->TextResume); $output .= $GLOBALS['MarkupFunction']("LinkToResume",$this->LinkToResume);//DEP //NOTIMPL $output .= $this->SupportingMaterials[]->Markup(); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); return $GLOBALS['MarkupFunction']("NONXMLResume",$output); } } class SEPContactInfoType { var $PersonName; var $ContactMethod = array(); function SEPContactInfoType($PersonName,$ContactMethod) { $this->PersonName = $PersonName; $this->ContactMethod = $ContactMethod; } function Markup() { $output = ""; $output .= $this->PersonName->Markup(); $output .= $this->ContactMethod->Markup(); return $output; } } class PersonNameType { var $FormattedName; var $LegalName; var $GivenName; var $PreferredGivenName; var $MiddleName; var $FamilyName; var $MarkupId;//This allows changing the markup ID for a PersonName:Specifically Publication Authors require markup ID of 'Name' NOT 'PersonName' function PersonNameType($PersonId,$MarkupId="PersonName") { $sql = "SELECT ". "person.FirstName AS GivenName, ". "person.MiddleName AS MiddleName, ". "person.LastName AS FamilyName ". "FROM ". "person ". "WHERE ". "person.PersonId=$PersonId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->GivenName = $attributes['GivenName']; $this->FamilyName = $attributes['FamilyName']; $this->MiddleName = $attributes['MiddleName']; @mysql_free_result($result); $attributes=$sql=$result=NULL; $this->MarkupId=$MarkupId; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("FamilyName",$this->FamilyName); $output .= $GLOBALS['MarkupFunction']("GivenName",$this->GivenName); $formattedName = $this->GivenName; ($this->MiddleName) ? $formattedName .= " ".$this->MiddleName." " : $formattedName.= " "; $formattedName .= $this->FamilyName; $output .= $GLOBALS['MarkupFunction']("FormattedName",$formattedName); return $GLOBALS['MarkupFunction']($this->MarkupId,$output); } } class EmploymentHistoryType { var $EmployerOrg = array(); function EmploymentHistoryType($ResumeId) { $this->EmployerOrg = array(); $sql = "SELECT ". "organization.Name AS OrgName, ". "organization.City AS Municipality, ". "organization.Zip AS PostalCode, ". "organization.State AS Region, ". "employment.EmploymentId AS EmploymentId ". "FROM ". "organization,employment ". "WHERE ". "employment.EmployerId=organization.OrganizationId AND ". "employment.ResumeId = $ResumeId ". "GROUP BY employment.EmploymentId"; $result = @mysql_query($sql); while($attributes = @mysql_fetch_assoc($result)) { $temp = new EmployerOrgType(); $temp->EmployerOrgName = $attributes['OrgName']; $temp->EmployerContactInfo->LocationSummary->Municipality = $attributes['Municipality']; $temp->EmployerContactInfo->LocationSummary->PostalCode = $attributes['PostalCode']; $temp->EmployerContactInfo->LocationSummary->Region = $attributes['Region']; $sql = "SELECT ". "role.Description AS positionType,". "job.Title AS Title,". "DATE_FORMAT(job.StartDate,'%Y-%m') AS StartDate,". "DATE_FORMAT(job.EndDate,'%Y-%m') AS EndDate,". "job.Description AS Description,". "organization.Name AS OrganizationName ". "FROM ". "job,role,organization ". "WHERE ". "job.OrganizationId=organization.OrganizationId AND ". "job.RoleId=role.RoleId AND ". "job.EmploymentId = {$attributes['EmploymentId']} ". "GROUP BY job.JobId"; $tempResult = @mysql_query($sql); $i=0; while($position = @mysql_fetch_assoc($tempResult)) { $temp->PositionHistory[$i] = new PositionHistoryType(); $temp->PositionHistory[$i]->positionType=$position['positionType']; $temp->PositionHistory[$i]->Title=$position['Title']; $temp->PositionHistory[$i]->OrgName->OrganizationName=$position['OrganizationName']; $temp->PositionHistory[$i]->StartDate=$position['StartDate']; $temp->PositionHistory[$i]->EndDate=$position['EndDate']; $temp->PositionHistory[$i]->Description=$position['Description']; $i++; } @mysql_free_result($tempResult); $this->EmployerOrg[count($this->EmployerOrg)] = $temp; $temp = NULL; } @mysql_free_result($result); $attributes=$result=$sql=NULL; } function Markup() { $output = ""; for($i=0;$i<count($this->EmployerOrg);$i++) $output .= $this->EmployerOrg[$i]->Markup(); return $GLOBALS['MarkupFunction']("EmploymentHistory",$output); } } class EmployerOrgType { var $employerOrgType; var $EmployerOrgName; var $EmployerContactInfo; var $PositionHistory; var $UserArea; function EmployerOrgType() { $this->EmployerContactInfo = new EmployerContactInfoType(); $this->PositionHistory = array(); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("EmployerOrgName",$this->EmployerOrgName); $output .= $this->EmployerContactInfo->Markup(); for($i=0;$i<count($this->PositionHistory);$i++) $output .= $this->PositionHistory[$i]->Markup(); //NOTIMPL $output .= $this->UserArea->Markup(); return $GLOBALS['MarkupFunction']("EmployerOrg",$output); } } class EmployerContactInfoType { var $contactType; var $PersonName; var $ContactMethod; var $LocationSummary; var $InternetDomainName; function EmployerContactInfoType() { //NOTIMPL $this->ContactMethod = new ContactMethodType(); $this->LocationSummary = new LocationSummaryType(); } function Markup() { $output = ""; $output .= $this->LocationSummary->Markup(); return $GLOBALS['MarkupFunction']("EmployerContactInfo",$output); } } class LocationSummaryType { var $Municipality; var $Region; var $PostalCode; function LocationSummaryType() { } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("Municipality",$this->Municipality); $output .= $GLOBALS['MarkupFunction']("Region",$this->Region); $output .= $GLOBALS['MarkupFunction']("PostalCode",$this->PostalCode); return $GLOBALS['MarkupFunction']("LocationSummary",$output); } } class PositionHistoryType { var $Title; var $OrgName; var $OrgInfo; var $OrgIndustry; var $OrgSize; var $Description; var $StartDate; var $EndDate; var $Compensation; var $Comments; var $Verification; var $JobLevelInfo; var $JobCategory; var $Competency; var $UserArea; function PositionHistoryType() { $this->OrgName=new PositionOrgNameType(); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); $output .= $this->OrgName->Markup(); $output .= $GLOBALS['MarkupFunction']("Description",$this->Description); $output .= $GLOBALS['MarkupFunction']("StartDate",$GLOBALS['MarkupFunction']("YearMonth",$this->StartDate)); $output .= $GLOBALS['MarkupFunction']("EndDate",$GLOBALS['MarkupFunction']("YearMonth",$this->EndDate)); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Compensation",$this->Compensation); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Verification",$this->Verification); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("JobLevelInfo",$this->JobLevelInfo); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("JobCategory",$this->JobCategory); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Competency",$this->Competency); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("UserArea",$this->UserArea); return $GLOBALS['MarkupFunction']("PositionHistory",$output); } } class PositionOrgNameType { //NOTIMPL var $organizationType; var $OrganizationName; function PositionOrgNameType() { } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("OrganizationName",$this->OrganizationName); return $GLOBALS['MarkupFunction']("OrgName",$output); } } class EducationHistoryType { var $SchoolOrInstitution = array(); function EducationHistoryType($ResumeId) { $this->SchoolOrInstitution = array(); $sql = "SELECT education.EducationId FROM education WHERE education.ResumeId={$ResumeId}"; $result = @mysql_query($sql); while($EducationId = @mysql_fetch_array($result)) $this->SchoolOrInstitution[count($this->SchoolOrInstitution)]=new SchoolOrInstitutionType($EducationId[0]); @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->SchoolOrInstitution);$i++) $output .= $this->SchoolOrInstitution[$i]->Markup(); return $GLOBALS['MarkupFunction']("EducationHistory",$output); } } class SchoolOrInstitutionType { var $schoolType; var $School; var $LocationSummary; var $PostalAddress; var $OrganizationUnit; var $Degree = array(); function SchoolOrInstitutionType($EducationId) { $this->LocationSummary = new LocationSummaryType(); //NOTIMPL $this->PostalAddress = new PostalAddressType(); $sql = "SELECT organization.Name ". "FROM organization,education ". "WHERE organization.OrganizationId=education.OrganizationId AND education.EducationId = {$EducationId}"; $Organization = mysql_fetch_array(mysql_query($sql)); $this->School = new SchoolNameType($Organization[0]); $sql = "SELECT degree.DegreeId FROM degree WHERE degree.EducationId={$EducationId}"; $result = @mysql_query($sql); while($degree = @mysql_fetch_array($result)) { $this->Degree[count($this->Degree)] = new EduDegreeType($degree[0]); } @mysql_free_result($result); } function Markup() { $output = ""; $output .= $this->School->Markup(); $output .= $this->LocationSummary->Markup(); //NOTIMPL $output .= $this->PostalAddress->Markup(); $output .= $GLOBALS['MarkupFunction']("OrganizationUnit",$this->OrganizationUnit); for($i=0;$i<count($this->Degree);$i++) $output .= $this->Degree[$i]->Markup(); return $GLOBALS['MarkupFunction']("SchoolOrInstitutionType",$output); } } class EduDegreeType { var $DegreeName; var $DegreeDate; var $OtherHonors; var $DegreeMajor; var $DegreeMinor; var $DegreeMeasure; var $DatesOfAttendance; var $Comments; var $UserArea; function EduDegreeType($DegreeId) { $sql = "SELECT * ". "FROM degree ". "WHERE degree.DegreeId = $DegreeId"; $result = @mysql_query($sql); $Degree = @mysql_fetch_assoc($result); $this->DegreeName = $Degree['Name']; $this->DegreeDate = $Degree['DegreeDate']; //NOTIMPL $this->OtherHonors = $Degree['OtherHonors']; //NOTIMPL $this->DegreeMajor = $Degree['Major']; //NOTIMPL $this->DegreeMinor = $Degree['Minor']; //NOTIMPL $this->DegreeMeasure = new DegreeMeasureType(); $this->DatesOfAttendance = new DatesOfAttendancetype($Degree['StartDate'],$Degree['EndDate']); $this->Comments = $Degree['Comments']; //NOTIMPL $this->UserArea = new UserAreaType(); @mysql_free_result($result); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("DegreeName",$this->DegreeName); $output .= $GLOBALS['MarkupFunction']("DegreeDate",$this->DegreeDate); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("OtherHonors",$this->OtherHonors); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("DegreeMajor",$this->DegreeMajor); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("DegreeMinor",$this->DegreeMinor); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("DegreeMeasure",$this->DegreeMeasure); $output .= $this->DatesOfAttendance->Markup(); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); //NOTIMPL $output .= $this->UserArea->Markup(); return $GLOBALS['MarkupFunction']("Degree",$output); } } class SchoolNameType { var $InternetDomainName; var $SchoolId; var $SchoolName; function SchoolNameType($SchoolName) { $this->SchoolName = $SchoolName; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("InternetDomainName",$this->InternetDomainName); $output .= $GLOBALS['MarkupFunction']("SchoolId",$this->SchoolId); $output .= $GLOBALS['MarkupFunction']("SchoolName",$this->SchoolName); return $GLOBALS['MarkupFunction']("SchoolNameType",$output); } } class DatesOfAttendanceType { var $StartDate; var $EndDate; function DatesOfAttendanceType($StartDate,$EndDate) { $this->StartDate = $StartDate; $this->EndDate = $EndDate; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("StartDate",$this->StartDate); $output .= $GLOBALS['MarkupFunction']("EndDate",$this->EndDate); return $GLOBALS['MarkupFunction']("DatesOfAttendanceType",$output); } } class AssociationType { var $type; var $Name; var $Id; var $Link; var $StartDate; var $EndDate; //NOTIMPL var $Role; var $Comments; function AssociationType($MembershipId) { $sql = "SELECT ". "membership.*,". "organization.Name AS Name ". "FROM membership,organization ". "WHERE ". "membership.OrganizationId = organization.OrganizationId AND ". "MembershipId=$MembershipId"; $result=@mysql_query($sql); $association=@mysql_fetch_assoc($result); $this->type = "Professional"; $this->Name = $association['Name']; //NOTIMPL $this->Id = //NOTIMPL $this->Link = $association['Link']; $this->StartDate = $association['StartDate']; $this->EndDate = $association['EndDate']; //NOTIMPL $this->Role = $this->Comments = $association['Description']; @mysql_free_result($result); } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("Name",$this->Name); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Id",$this->Id); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); $output .= $GLOBALS['MarkupFunction']("StartDate",$this->StartDate); $output .= $GLOBALS['MarkupFunction']("EndDate",$this->EndDate); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); return $GLOBALS['MarkupFunction']("Association",$output); } } class PublicationHistoryType { var $FormattedPublicationDescription; var $Article = array(); var $Book = array(); var $ConferencePaper = array(); var $OtherPublication = array(); function PublicationHistoryType($ResumeId) { $sql = "SELECT publication_type.Description,publication.PublicationId ". "FROM publication,publication_type ". "WHERE ". "publication.PublicationTypeId = publication_type.PublicationTypeId AND ". "publication.ResumeId={$ResumeId}"; $result = @mysql_query($sql); while ($Publication = @mysql_fetch_array($result)) { switch($Publication[0]) { case "Article": $this->Article[count($this->Article)] = new ArticleType($Publication[1]); break; case "Book": $this->Book[count($this->Book)] = new BookType($Publication[1]); break; case "ConferencePaper": $this->ConferencePaper[count($this->ConferencePaper)] = new ConferencePaperType($Publication[1]); break; default: $this->OtherPublication[count($this->OtherPublication)] = new OtherPublicationType($Publication[1]); } } @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->Article);$i++) $output .= $this->Article[$i]->Markup(); for($i=0;$i<count($this->Book);$i++) $output .= $this->Book[$i]->Markup(); for($i=0;$i<count($this->ConferencePaper);$i++) $output .= $this->ConferencePaper[$i]->Markup(); for($i=0;$i<count($this->OtherPublication);$i++) $output .= $this->OtherPublication[$i]->Markup(); return $GLOBALS['MarkupFunction']("PublicationHistory",$output); } } class ContactMethodType { var $Use; var $Location; var $WhenAvailable; var $Telephone; var $Mobile; var $Fax; var $Pager; var $TTYTDD; var $InternetEmailAddress; var $InternetWebAddress; var $PostalAddress; function ContactMethodType($PersonId) { $sql = "SELECT ". "person.Phone AS Telephone, ". "person.Mobile AS Mobile, ". "person.Fax AS Fax, ". "person.Pager AS Pager, ". "person.Email AS InternetEmailAddress ". "FROM ". "person,usr,resume ". "WHERE ". "person.PersonId = $PersonId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->Telephone = $attributes['Telephone']; $this->Mobile = $attributes['Mobile']; $this->Fax = $attributes['Fax']; $this->Pager = $attributes['Pager']; $this->InternetEmailAddress = $attributes['InternetEmailAddress']; $this->PostalAddress = new PostalAddressType($PersonId); @mysql_free_result($result); $attributes=$sql=$result=NULL; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("Telephone",$this->Telephone); $output .= $GLOBALS['MarkupFunction']("Mobile",$this->Mobile); $output .= $GLOBALS['MarkupFunction']("Fax",$this->Fax); $output .= $GLOBALS['MarkupFunction']("Pager",$this->Pager); $output .= $GLOBALS['MarkupFunction']("InternetEmailAddress",$this->InternetEmailAddress); $output .= $this->PostalAddress->Markup(); return $GLOBALS['MarkupFunction']("ContactMethod",$output); } } class PostalAddressType { var $type; var $CountryCode; var $PostalCode; var $Region; var $Municipality; var $DeliveryAddress; var $Recipient; function PostalAddressType($PersonId) { $sql = "SELECT ". "person.Street AS Street, ". "person.Street2 AS Street2, ". "person.City AS City, ". "person.State AS State, ". "person.Zip AS Zip, ". "person.CountryId AS CountryCode ". "FROM person ". "WHERE person.PersonId=$PersonId"; $result = @mysql_query($sql); $attributes = @mysql_fetch_assoc($result); $this->CountryCode = strtoupper($attributes['CountryCode']); $this->PostalCode = $attributes['Zip']; $this->Region = $attributes['State']; $this->Municipality = $attributes['City']; $this->DeliveryAddress = new DeliveryAddress($attributes['Street']); //NOTIMPL $this->Recipient = @mysql_free_result($result); $attributes=$sql=$result=NULL; } function Markup() { $output = ""; $output .= $this->DeliveryAddress->Markup(); $output .= $GLOBALS['MarkupFunction']("CountryCode",$this->CountryCode); $output .= $GLOBALS['MarkupFunction']("Municipality",$this->Municipality); $output .= $GLOBALS['MarkupFunction']("Region",$this->Region); $output .= $GLOBALS['MarkupFunction']("PostalCode",$this->PostalCode); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Recipient",$this->Recipient); return $GLOBALS['MarkupFunction']("PostalAddress",$output); } } class DeliveryAddress { var $AddressLine; var $StreetName; var $BuildingNumber; var $Unit; var $PostOfficeBox; function DeliveryAddress($AddressLine) { $this->AddressLine = $AddressLine; //NOTIMPL $this->StreetName = $StreetName; //NOTIMPL $this->BuildingNumber = $BuildingNumber; //NOTIMPL $this->Unit = $Unit; //NOTIMPL $this->PostOfficeBox = $PostOfficeBox; } function Markup() { $output = ""; $output .= $GLOBALS['MarkupFunction']("AddressLine",$this->AddressLine); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("StreetName",$this->StreetName); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("BuildingNumber",$this->BuildingNumber); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Unit",$this->Unit); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("PostOfficeBox",$this->PostOfficeBox); return $GLOBALS['MarkupFunction']("DeliveryAddress",$output); } } class BasicBibliographicRecordType { var $Title; var $Name; var $PublicationDate; var $Link; var $Abstract; var $Copyright; var $Comments; function BasicBibliographicRecordType($PublicationId) { $this->Name = array(); $sql = "SELECT person.PersonId AS PersonId ". "FROM publication_author,author,person ". "WHERE ". "author.PersonId = person.PersonId AND ". "publication_author.AuthorId = author.AuthorId AND ". "publication_author.PublicationId = $PublicationId"; $authors = @mysql_query($sql); while($author = @mysql_fetch_array($authors)) { $this->Name[count($this->Name)] = new PersonNameType($author[0],"Name"); } @mysql_free_result($authors); } } class ArticleType extends BasicBibliographicRecordType { //NOTIMPL var $JournalOrSerialName; //NOTIMPL var $ISSN; //NOTIMPL var $Volume; //NOTIMPL var $Issue; var $PageNumber; //NOTIMPL var $PublicationLanguage; function ArticleType($PublicationId) { parent::BasicBiblioGraphicRecordType($PublicationId);//Constructor for parent class is called to setup Names! $sql = "SELECT * FROM publication WHERE PublicationId = $PublicationId"; $result = @mysql_query($sql); $Publication = @mysql_fetch_assoc($result); $this->Title = $Publication['Title']; $this->PublicationDate = $Publication['PublishDate']; $this->Link = $Publication['URL']; //NOTOMPL $this->Abstract = $Publication['Abstract']; //NOTOMPL $this->Copyright = $Publication['Copyright']; //NOTOMPL $this->Comments = $Publication['Comments']; $this->JournalOrSerialName = $Publication['Publisher']; //NOTOMPL $this->ISSN = $Publication['ISSN']; //NOTIMPL $this->Volume = $Publication['Volume']; //NOTOMPL $this->Issue = $Publication['Issue']; $this->PageNumber = $Publication['PageNums']; //NOTOMPL $this->PublicationLanguage = $Publication['PublicationLanguage']; @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->Name);$i++) $output .= $this->Name[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); $output .= $GLOBALS['MarkupFunction']("JournalOrSerialName",$this->JournalOrSerialName); $output .= $GLOBALS['MarkupFunction']("PublicationDate",$this->PublicationDate); $output .= $GLOBALS['MarkupFunction']("PageNumber",$this->PageNumber); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Abstract",$this->Abstract); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Copyright",$this->Copyright); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISSN",$this->ISSN); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Volume",$this->Volume); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Issue",$this->Issue); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("PublicationLanguage",$this->PublicationLanguage); return $GLOBALS['MarkupFunction']("Article",$output); } } class BookType extends BasicBibliographicRecordType { var $Edition; var $Chapter; var $ISSN; var $ISBN; var $NumberOfPages; var $PublisherName; var $PublisherLocation; function BookType($PublicationId) { parent::BasicBiblioGraphicRecordType($PublicationId);//Constructor for parent class is called to setup Names! $sql = "SELECT * FROM publication WHERE PublicationId = $PublicationId"; $result = @mysql_query($sql); $Publication = @mysql_fetch_assoc($result); $this->Title = $Publication['Title']; $this->PublicationDate = $Publication['PublishDate']; $this->Link = $Publication['URL']; //NOTOMPL $this->Abstract = $Publication['Abstract']; //NOTOMPL $this->Copyright = $Publication['Copyright']; //NOTOMPL $this->Comments = $Publication['Comments']; //NOTIMPL $this->Edition = $Publication['Edition']; //NOTIMPL $this->Chapter = $Publication['Chapter']; //NOTOMPL $this->ISSN = $Publication['ISSN']; //NOTOMPL $this->ISBN = $Publication['ISBN']; $this->NumberOfPages = $Publication['PageNums']; $this->PublisherName = $Publication['Publisher']; //NOTOMPL $this->PublisherLocation = $Publication['PublisherLocation']; @mysql_free_result($result); } function Markup() { /* The markup function for BOOK has a modified order to assist in displaying the book info in MLA format. */ $output = ""; for($i=0;$i<count($this->Name);$i++) $output .= $this->Name[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("PublisherLocation",$this->PublisherLocation); $output .= $GLOBALS['MarkupFunction']("PublisherName",$this->PublisherName); $output .= $GLOBALS['MarkupFunction']("PublicationDate",$this->PublicationDate); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Abstract",$this->Abstract); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Copyright",$this->Copyright); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Edition",$this->Edition); //NOTIMPL $output .= $GLOBALS['MarkupFunction']("Chapter",$this->Chapter); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISSN",$this->ISSN); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISBN",$this->ISBN); $output .= $GLOBALS['MarkupFunction']("NumberOfPages",$this->NumberOfPages); return $GLOBALS['MarkupFunction']("Book",$output); } } class ConferencePaperType extends BasicBibliographicRecordType { var $EventName; var $ConferenceDate; var $ConferenceLocation; function ConferencePaperType($PublicationId) { parent::BasicBiblioGraphicRecordType($PublicationId);//Constructor for parent class is called to setup Names! $sql = "SELECT * FROM publication WHERE PublicationId = $PublicationId"; $result = @mysql_query($sql); $Publication = @mysql_fetch_assoc($result); $this->Title = $Publication['Title']; $this->PublicationDate = $Publication['PublishDate']; $this->Link = $Publication['URL']; //NOTOMPL $this->Abstract = $Publication['Abstract']; //NOTOMPL $this->Copyright = $Publication['Copyright']; //NOTOMPL $this->Comments = $Publication['Comments']; @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->Name);$i++) $output .= $this->Name[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); $output .= $GLOBALS['MarkupFunction']("PublicationDate",$this->PublicationDate); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Abstract",$this->Abstract); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Copyright",$this->Copyright); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); return $GLOBALS['MarkupFunction']("ConferencePaper",$output); } } class OtherPublicationType extends BasicBibliographicRecordType { var $ISSN; var $ISBN; var $NumberOfPages; var $PublisherName; var $PublisherLocation; function OtherPublicationtype($PublicationId) { parent::BasicBiblioGraphicRecordType($PublicationId);//Constructor for parent class is called to setup Names! $sql = "SELECT * FROM publication WHERE PublicationId = $PublicationId"; $result = @mysql_query($sql); $Publication = @mysql_fetch_assoc($result); $this->Title = $Publication['Title']; $this->PublicationDate = $Publication['PublishDate']; $this->Link = $Publication['URL']; //NOTOMPL $this->Abstract = $Publication['Abstract']; //NOTOMPL $this->Copyright = $Publication['Copyright']; //NOTOMPL $this->Comments = $Publication['Comments']; //NOTOMPL $this->ISSN = $Publication['ISSN']; //NOTOMPL $this->ISBN = $Publication['ISBN']; $this->NumberOfPages = $Publication['PageNums']; $this->PublisherName = $Publication['Publisher']; //NOTOMPL $this->PublisherLocation = $Publication['PublisherLocation']; @mysql_free_result($result); } function Markup() { $output = ""; for($i=0;$i<count($this->Name);$i++) $output .= $this->Name[$i]->Markup(); $output .= $GLOBALS['MarkupFunction']("Title",$this->Title); $output .= $GLOBALS['MarkupFunction']("PublisherName",$this->PublisherName); $output .= $GLOBALS['MarkupFunction']("PublicationDate",$this->PublicationDate); $output .= $GLOBALS['MarkupFunction']("NumberOfPages",$this->NumberOfPages); $output .= $GLOBALS['MarkupFunction']("Link",$this->Link); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Abstract",$this->Abstract); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Copyright",$this->Copyright); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISSN",$this->ISSN); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("ISBN",$this->ISBN); //NOTOMPL $output .= $GLOBALS['MarkupFunction']("PublisherLocation",$this->PublisherLocation); return $GLOBALS['MarkupFunction']("OtherPublicationType",$output); } } class DistributionGuidelinesType { var $DistributeTo; var $DoNotDistribute; function DistributionGuidelinesType($ResumeId) { $this->DistributeTo = array(); $this->DoNotDistribute = array(); } function Markup() { $output = ""; return $GLOBALS['MarkupFunction']("DistributionGuidelines",$output); } } class DistributionType { var $validFrom; var $validTo; var $Id; var $Name; function DistributionType($Id,$Name,$validFrom,$validTo) { $this->Id = $Id; $this->Name = $Name; $this->validFrom = $validFrom; $this->validTo = $validTo; } function Markup() { //echo "Displaying DistributionType"; } } class ReferenceType { var $type; var $PersonName; var $PositionTitle; var $ContactMethod; var $Comments; function ReferenceType($ReferenceId) { $sql = "SELECT reference.PersonId AS PersonId FROM reference WHERE ReferenceId=$ReferenceId"; $result = @mysql_query($sql); $reference = @mysql_fetch_assoc($result); $this->PersonName = new PersonNameType($reference['PersonId']); //NOTIMPL $this->PositionTitle = $reference['PositionTitle']; $this->ContactMethod = new ContactMethodType($reference['PersonId']); //$this->Comments = $reference['Comments']; @mysql_free_result($result); } function Markup() { $output = ""; $output .= $this->PersonName->Markup(); $output .= $GLOBALS['MarkupFunction']("PositionTitle",$this->PositionTitle); $output .= $this->ContactMethod->Markup(); $output .= $GLOBALS['MarkupFunction']("Comments",$this->Comments); return $GLOBALS['MarkupFunction']("Reference",$output); } } function divMarkup($id,$content,$attributes=array()) { /* Nothing is done with the attributes array... it is simply there for easily switching between xmlMarkup and divMarkup */ if($content == "" && $GLOBALS['DisplayEmptyElements']==false) return ""; else return "\n<div class='$id'>$content</div>\n"; } function xmlMarkup($id,$content,$attributes=array()) { if($content == "" && $GLOBALS['DisplayEmptyElements']==false) return ""; else { $output = ""; $output .= "\n<$id"; foreach ($attributes as $attribute => $value) $output.= " $attribute=\"$value\""; $output .= ">$content</$id>\n"; return $output; } } /* $resume = new Resume("s-bbieber1"); header("Content-type: text/xml"); echo $resume->Markup(); */ ?> \ No newline at end of file diff --git a/save.php b/save.php index 684d3a7a727d71a38d142fd418140fe6ff167842..d125edafc80fbdd0e72e15244aacfc2d2c1a939e 100644 --- a/save.php +++ b/save.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); /* This page takes in POST data and saves to the database */ ini_set("display_errors",true); $parsedurl = parse_url($_SERVER['HTTP_REFERER']); $path = pathinfo($parsedurl['path']); $filename = $path['basename']; $debug = false; switch ($filename) { case "DropDownLookup.php": $table = $_SESSION['table']; if(!isset($_POST['cancelButton'])) { updateArray(); if(isset($_POST['add'.$_SESSION['table']])) { $updateFields = explode(",",$_POST['_updateArray']); $sql = "INSERT INTO ".$_SESSION['table']." (".$_POST['_updateArray'].",CreatedBy) VALUES ("; for($i=0;$i<count($updateFields);$i++) { if(isset($_POST[$updateFields[$i]])) $sql .= $_POST[$updateFields[$i]].","; else $sql .= "'',"; } $sql .= "'".$_SESSION['Login']."')"; echo $sql; mysql_query($sql) or die(mysql_error()); } if(isset($_POST['delete'.$_SESSION['table'].'s'])) { echo "calling deleteArray();"; deleteArray($_SESSION['table'],$_POST['_updateWhere']); } } break; case "MembershipDetail.php": if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { if(saveData("membership",array("Title","Description","OrganizationId","StartDate","EndDate"),$HTTP_POST_VARS,"MembershipId=".$_POST['MembershipId'],$_SESSION['existingRecord'],"ResumeId",$_SESSION['ResumeId'])) $_SESSION['existingRecord'] = true; } else { if(isset($_POST['deleteButton']) && $_SESSION['existingRecord'] == true) { $sql = "DELETE FROM membership WHERE MembershipId=".$_POST['MembershipId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; if(mysql_query($sql)) $_SESSION['existingRecord'] = false; } } header("Location: ".$path['dirname']."/MembershipList.php"); exit(); break; case "AwardDetail.php": if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { if(saveData("award",array("Title","Description","OrganizationId","DateGiven"),$HTTP_POST_VARS,"AwardId=".$_POST['AwardId'],$_SESSION['existingRecord'],"ResumeId",$_SESSION['ResumeId'])) $_SESSION['existingRecord'] = true; } else { if(isset($_POST['deleteButton']) && $_SESSION['existingRecord'] == true) { $sql = "DELETE FROM award WHERE AwardId=".$_POST['AwardId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; if(mysql_query($sql)) $_SESSION['existingRecord'] = false; } } header("Location: ".$path['dirname']."/AwardList.php"); exit(); break; case "ReferencesDetail.php": $existingrecord = $_SESSION['existingRecord']; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { //save the person info $formFields = array("Title","FirstName","LastName","Email","Phone","Phone2","Mobile","Pager"); saveData("person",$formFields,$HTTP_POST_VARS,"PersonId=".$_POST['PersonId'],$existingrecord,"PersonId","NULL"); if($existingrecord==false) $personid = mysql_insert_id($GLOBALS['link_identifier']); else $personid = $_POST['PersonId']; $fieldValues = array(); $fieldValues['PersonId'] = $personid; $fieldValues['OrganizationId'] = $_POST['OrganizationId']; //insert/update the reference info saveData("reference",array("OrganizationId","PersonId"),$fieldValues,"ReferenceId=".$_POST['ReferenceId'],$existingrecord,"ResumeId",$_SESSION['ResumeId']); } else { if(isset($_POST['deleteButton']) && $existingrecord == true) { $sql = "DELETE FROM person WHERE PersonId=".$_POST['PersonId']." LIMIT 1"; mysql_query($sql); $sql = "DELETE FROM reference WHERE ReferenceId=".$_POST['ReferenceId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; mysql_query($sql); } } header("Location: ".$path['dirname']."/ReferencesList.php"); exit(); break; case "skills.php": $table = "skill"; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { updateArray(); if(isset($_POST['addButton'])) { echo "addButton was Pressed!<br />"; //add an entry in the skills table $sql = "INSERT INTO skill ". "(SkillItemId,ResumeId) ". "VALUES ". "(".$_POST['SkillItemId'].",".$_SESSION['ResumeId'].")"; echo $sql; mysql_query($sql); echo mysql_error(); } } else { echo "delete or cancel was pressed"; if(isset($_POST['deleteButton'])) { echo "delete button was pressed"; deleteArray("skill","SkillId"); } } break; case "AdditionalInfo.php": saveData("additional",array("Description"),$HTTP_POST_VARS,"ResumeId=".$_SESSION['ResumeId'],$_SESSION['existingRecord'],"ResumeId",$_SESSION['ResumeId']); break; case "PublicationDetail.php": $existingrecord = $_SESSION['existingRecord']; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { //save this publications details $form_fields = array("PublicationTypeId","Publisher","Title","PublishDate","PageNums","URL"); saveData("publication",$form_fields,$HTTP_POST_VARS,"PublicationId=".$_POST['PublicationId']." AND ResumeId=".$_SESSION['ResumeId'],$existingrecord,"ResumeId",$_SESSION['ResumeId']); $publicationid = mysql_insert_id($GLOBALS['link_identifier']); if($existingrecord == false) { //automatically add the author to the list of authors. //find out if this person is already in the author table. $sql = "SELECT usr.PersonId FROM usr WHERE UserId = '".$_SESSION['Login']."'"; $pidresult = mysql_fetch_array(mysql_query($sql)); $sql = "SELECT author.AuthorId FROM author WHERE author.PersonId=".$pidresult[0]; $result = mysql_query($sql); if(mysql_num_rows($result)==1) { $row = mysql_fetch_array($result); $authorid = $row[0]; } else { $sql = "INSERT INTO author (PersonId) VALUES (".$pidresult[0].")"; mysql_query($sql); $authorid = mysql_insert_id($GLOBALS['link_identifier']); } $sql = "INSERT INTO publication_author (AuthorId,PublicationId) VALUES (".$authorid.",".$publicationid.")"; mysql_query($sql); $_SESSION['existingRecord'] = true; } } else { echo "cancel or delete button was selected<br />"; if(isset($_POST['deleteButton']) && $existingrecord==true) { //remove this publication, and any entries in the publication_author table $sql = "DELETE FROM publication_author WHERE PublicationId=".$_POST['PublicationId']; echo $sql; mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM publication WHERE PublicationId=".$_POST['PublicationId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; echo $sql; mysql_query($sql) or die(mysql_error()); } header("Location: ".$path['dirname']."/PublicationList.php"); exit(); } break; case "EducationDetail.php": $existingrecord = $_SESSION['existingRecord']; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { saveData("education",array("OrganizationId"),$HTTP_POST_VARS,"EducationId=".$_POST['EducationId']." AND ResumeId=".$_SESSION['ResumeId'],$existingrecord,"ResumeId",$_SESSION['ResumeId']); if($existingrecord==false) $educationId = mysql_insert_id($GLOBALS['link_identifier']); else $educationId = $_POST['EducationId']; $form_fields = array("DegreeTypeId","StartDate","EndDate","Gpa","Name","Comments"); saveData("degree",$form_fields,$HTTP_POST_VARS,"DegreeId=".$_POST['DegreeId'],$existingrecord,"EducationId",$educationId); } else { echo "cancel or delete button was selected<br />"; if(isset($_POST['deleteButton']) && $existingrecord==true) { echo "delete button was pressed and there was an existing record<br />"; $sql = "DELETE FROM degree WHERE DegreeId=".$_POST['DegreeId']; mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM education WHERE EducationId=".$_POST['EducationId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; mysql_query($sql) or die(mysql_error()); header("Location: ".$path['dirname']."/education.php"); exit(); } } break; case "personal.php": //Need the PersonId from the usr table $sql = "SELECT PersonId FROM usr WHERE UserId = '".$_SESSION['Login']."'"; $resultset = @mysql_query($sql); $result = @mysql_fetch_assoc($resultset); $table = "person"; $updateWhere = "PersonId = ".$result['PersonId']; $existingRecord = true; if(saveData($table,array_keys($HTTP_POST_VARS),$HTTP_POST_VARS,$updateWhere,$existingRecord,"ResumeId",$_SESSION['ResumeId'])) $_SESSION['existingRecord']=true; break; case "objective.php": $table = $_SESSION['table']; $existingRecord = $_SESSION['existingRecord']; $updateWhere = "ResumeId = ".$_SESSION['ResumeId']; if(saveData($table,array_keys($HTTP_POST_VARS),$HTTP_POST_VARS,$updateWhere,$existingRecord,"ResumeId",$_SESSION['ResumeId'])) $_SESSION['existingRecord']=true; break; case "summary.php": $table = $_SESSION['table']; if(isset($_POST['addKeyword'])) { echo "Adding keyword"; $sql = "INSERT INTO summary (SummaryType,ResumeId) VALUES ('K',".$_SESSION['ResumeId'].")"; @mysql_query($sql); } if(isset($_POST['deleteKeywords'])) { deleteArray("summary","SummaryId"); } updateArray(); break; case "employmentHistoryDetail.php": echo "employmentHistoryDetail Case<br />"; $existingrecord = $_SESSION['existingRecord']; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { echo "save button was selected<br />"; if($existingrecord) { $sql = "UPDATE employment ". "SET ". "StartDate = '".$_POST['Start_Date']."',". "EndDate = '".$_POST['End_Date']."',". "EmployerId = ".$_POST['OrganizationId']." ". "WHERE EmploymentId = ".$_POST['EmploymentId']." ". "LIMIT 1"; mysql_query($sql) or die(mysql_error()); $sql = "UPDATE job ". "SET ". "StartDate = '".$_POST['Start_Date']."',". "EndDate = '".$_POST['End_Date']."',". "RoleId = ".$_POST['RoleId'].",". "Title = '".$_POST['Title']."',". "Description = '".$_POST['Description']."',". "OrganizationId = ".$_POST['ClientId'].",". "EmploymentId = ".$_POST['EmploymentId']." ". "WHERE JobId=".$_POST['JobId']." ". "LIMIT 1"; mysql_query($sql) or die(mysql_error()); //now the achievement array of fields $table="achievement"; updateArray(); if(isset($_POST['deleteAchievements'])) { deleteArray("achievement","AchievementId"); } if(isset($_POST['addAchievement'])) { $sql = "INSERT INTO achievement (JobId) VALUES (".$_POST['JobId'].")"; mysql_query($sql) or die(mysql_error()); } } else { $sql = "INSERT INTO employment ". "(StartDate,EndDate,EmployerId,ResumeId)". "VALUES ". "('".$_POST['Start_Date']."','".$_POST['End_Date']."',".$_POST['OrganizationId'].",".$_SESSION['ResumeId'].")"; mysql_query($sql) or die(mysql_error()); $sql = "INSERT INTO job ". "(StartDate,EndDate,RoleId,Title,Description,OrganizationId,EmploymentId)". "VALUES ". "('".$_POST['Start_Date']."','".$_POST['End_Date']."',".$_POST['RoleId'].",'".$_POST['Title']."','".$_POST['Description']."',".$_POST['ClientId'].",".mysql_insert_id($GLOBALS['link_identifier']).")"; mysql_query($sql) or die(mysql_error()); } } else { echo "cancel or delete button was selected<br />"; if(isset($_POST['deleteButton']) && $existingrecord==true) { echo "delete button was pressed and there was an existing record<br />"; $sql = "DELETE FROM achievement WHERE JobId=".$_POST['JobId']; mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM job WHERE JobId=".$_POST['JobId']." AND EmploymentId=".$_POST['EmploymentId']." LIMIT 1"; mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM employment WHERE EmploymentId = ".$_POST['EmploymentId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; mysql_query($sql) or die(mysql_error()); } header("Location: ".$path['dirname']."/employment.php"); exit(); } break; default: //UNKNOWN break; } if(!$debug) header("Location: ".$_SERVER['HTTP_REFERER']); function updateArray() { /* we have multiple Update commands that need to take place */ $updateFields = explode(",",$_POST['_updateArray']); for($i=0;$i<$_POST['_updateArrayCount'];$i++) { if($_POST[$_POST['_updateWhere']."__".$i]=="") $existingRecord = false; else $existingRecord = true; $updateWhere = $_POST['_updateWhere']."=".$_POST[$_POST['_updateWhere']."__".$i]; for($j=0;$j<count($updateFields);$j++) { $form_values[$updateFields[$j]] = $_POST[$updateFields[$j]."__".$i]; } if(!saveData($GLOBALS['table'],$updateFields,$form_values,$updateWhere,$existingRecord,"ResumeId",$_SESSION['ResumeId'])) echo mysql_error(); } } function deleteArray($table,$keyField) { for($i=0;$i<$_POST['_updateArrayCount'];$i++) { if(isset($_POST['Delete__'.$i])) { $sql = "DELETE FROM ".$table." WHERE ".$keyField." = ".$_POST[$keyField.'__'.$i]; @mysql_query($sql); } } } function saveData($table,$form_fields,$form_values,$updateWhere,$existingRecord=true,$foreignKeyField,$foreignKeyValue) { //We are ready to go... lets insert/update data $update_statement = "UPDATE ".$table." SET "; $update_definition = ""; $insert_statement = "INSERT INTO ".$table."("; $insert_definition = " VALUES ("; for ($i = 0; $i < sizeof($form_fields); $i++) { $thisField = $form_fields[$i]; $cleanField = ereg_replace(":","",$thisField); $thisValue = $form_values[$thisField]; if($thisValue=='') $thisValue = "NULL"; else if(substr($thisField,strlen($thisField)-2,2)!="Id") $thisValue = "'".$thisValue."'"; $update_definition = $update_definition.$cleanField."=".$thisValue.","; $insert_statement .= $cleanField.","; $insert_definition = $insert_definition.$thisValue.","; } $insert_statement = $insert_statement.$foreignKeyField.")".$insert_definition.$foreignKeyValue.")"; $update_definition = trim($update_definition,",")." WHERE ".$updateWhere; $update_statement = $update_statement.$update_definition." LIMIT 1"; if($existingRecord) $sql = $update_statement; else $sql = $insert_statement; $result = mysql_query($sql); echo $sql; if(!$result) echo mysql_error(); return $result; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Saving</title> </head> <body> <? echo $_SESSION['table']; ?> </body> </html> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); /* This page takes in POST data and saves to the database */ ini_set("display_errors",true); $parsedurl = parse_url($_SERVER['HTTP_REFERER']); $path = pathinfo($parsedurl['path']); $filename = $path['basename']; $debug = false; switch ($filename) { case "DropDownLookup.php": $table = $_SESSION['table']; if(!isset($_POST['cancelButton'])) { updateArray(); if(isset($_POST['add'.$_SESSION['table']])) { $updateFields = explode(",",$_POST['_updateArray']); $sql = "INSERT INTO ".$_SESSION['table']." (".$_POST['_updateArray'].",CreatedBy) VALUES ("; for($i=0;$i<count($updateFields);$i++) { if(isset($_POST[$updateFields[$i]])) $sql .= $_POST[$updateFields[$i]].","; else $sql .= "'',"; } $sql .= "'".$_SESSION['Login']."')"; echo $sql; mysql_query($sql) or die(mysql_error()); } if(isset($_POST['delete'.$_SESSION['table'].'s'])) { echo "calling deleteArray();"; deleteArray($_SESSION['table'],$_POST['_updateWhere']); } } break; case "MembershipDetail.php": if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { if(saveData("membership",array("Title","Description","OrganizationId","StartDate","EndDate"),$HTTP_POST_VARS,"MembershipId=".$_POST['MembershipId'],$_SESSION['existingRecord'],"ResumeId",$_SESSION['ResumeId'])) $_SESSION['existingRecord'] = true; } else { if(isset($_POST['deleteButton']) && $_SESSION['existingRecord'] == true) { $sql = "DELETE FROM membership WHERE MembershipId=".$_POST['MembershipId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; if(mysql_query($sql)) $_SESSION['existingRecord'] = false; } } header("Location: ".$path['dirname']."/MembershipList.php"); exit(); break; case "AwardDetail.php": if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { if(saveData("award",array("Title","Description","OrganizationId","DateGiven"),$HTTP_POST_VARS,"AwardId=".$_POST['AwardId'],$_SESSION['existingRecord'],"ResumeId",$_SESSION['ResumeId'])) $_SESSION['existingRecord'] = true; } else { if(isset($_POST['deleteButton']) && $_SESSION['existingRecord'] == true) { $sql = "DELETE FROM award WHERE AwardId=".$_POST['AwardId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; if(mysql_query($sql)) $_SESSION['existingRecord'] = false; } } header("Location: ".$path['dirname']."/AwardList.php"); exit(); break; case "ReferencesDetail.php": $existingrecord = $_SESSION['existingRecord']; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { //save the person info $formFields = array("Title","FirstName","LastName","Email","Phone","Phone2","Mobile","Pager"); saveData("person",$formFields,$HTTP_POST_VARS,"PersonId=".$_POST['PersonId'],$existingrecord,"PersonId","NULL"); if($existingrecord==false) $personid = mysql_insert_id($GLOBALS['link_identifier']); else $personid = $_POST['PersonId']; $fieldValues = array(); $fieldValues['PersonId'] = $personid; $fieldValues['OrganizationId'] = $_POST['OrganizationId']; //insert/update the reference info saveData("reference",array("OrganizationId","PersonId"),$fieldValues,"ReferenceId=".$_POST['ReferenceId'],$existingrecord,"ResumeId",$_SESSION['ResumeId']); } else { if(isset($_POST['deleteButton']) && $existingrecord == true) { $sql = "DELETE FROM person WHERE PersonId=".$_POST['PersonId']." LIMIT 1"; mysql_query($sql); $sql = "DELETE FROM reference WHERE ReferenceId=".$_POST['ReferenceId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; mysql_query($sql); } } header("Location: ".$path['dirname']."/ReferencesList.php"); exit(); break; case "skills.php": $table = "skill"; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { updateArray(); if(isset($_POST['addButton'])) { echo "addButton was Pressed!<br />"; //add an entry in the skills table $sql = "INSERT INTO skill ". "(SkillItemId,ResumeId) ". "VALUES ". "(".$_POST['SkillItemId'].",".$_SESSION['ResumeId'].")"; echo $sql; mysql_query($sql); echo mysql_error(); } } else { echo "delete or cancel was pressed"; if(isset($_POST['deleteButton'])) { echo "delete button was pressed"; deleteArray("skill","SkillId"); } } break; case "AdditionalInfo.php": saveData("additional",array("Description"),$HTTP_POST_VARS,"ResumeId=".$_SESSION['ResumeId'],$_SESSION['existingRecord'],"ResumeId",$_SESSION['ResumeId']); break; case "PublicationDetail.php": $existingrecord = $_SESSION['existingRecord']; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { //save this publications details $form_fields = array("PublicationTypeId","Publisher","Title","PublishDate","PageNums","URL"); saveData("publication",$form_fields,$HTTP_POST_VARS,"PublicationId=".$_POST['PublicationId']." AND ResumeId=".$_SESSION['ResumeId'],$existingrecord,"ResumeId",$_SESSION['ResumeId']); $publicationid = mysql_insert_id($GLOBALS['link_identifier']); if($existingrecord == false) { //automatically add the author to the list of authors. //find out if this person is already in the author table. $sql = "SELECT usr.PersonId FROM usr WHERE UserId = '".$_SESSION['Login']."'"; $pidresult = mysql_fetch_array(mysql_query($sql)); $sql = "SELECT author.AuthorId FROM author WHERE author.PersonId=".$pidresult[0]; $result = mysql_query($sql); if(mysql_num_rows($result)==1) { $row = mysql_fetch_array($result); $authorid = $row[0]; } else { $sql = "INSERT INTO author (PersonId) VALUES (".$pidresult[0].")"; mysql_query($sql); $authorid = mysql_insert_id($GLOBALS['link_identifier']); } $sql = "INSERT INTO publication_author (AuthorId,PublicationId) VALUES (".$authorid.",".$publicationid.")"; mysql_query($sql); $_SESSION['existingRecord'] = true; } } else { echo "cancel or delete button was selected<br />"; if(isset($_POST['deleteButton']) && $existingrecord==true) { //remove this publication, and any entries in the publication_author table $sql = "DELETE FROM publication_author WHERE PublicationId=".$_POST['PublicationId']; echo $sql; mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM publication WHERE PublicationId=".$_POST['PublicationId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; echo $sql; mysql_query($sql) or die(mysql_error()); } header("Location: ".$path['dirname']."/PublicationList.php"); exit(); } break; case "EducationDetail.php": $existingrecord = $_SESSION['existingRecord']; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { saveData("education",array("OrganizationId"),$HTTP_POST_VARS,"EducationId=".$_POST['EducationId']." AND ResumeId=".$_SESSION['ResumeId'],$existingrecord,"ResumeId",$_SESSION['ResumeId']); if($existingrecord==false) $educationId = mysql_insert_id($GLOBALS['link_identifier']); else $educationId = $_POST['EducationId']; $form_fields = array("DegreeTypeId","StartDate","EndDate","Gpa","Name","Comments"); saveData("degree",$form_fields,$HTTP_POST_VARS,"DegreeId=".$_POST['DegreeId'],$existingrecord,"EducationId",$educationId); } else { echo "cancel or delete button was selected<br />"; if(isset($_POST['deleteButton']) && $existingrecord==true) { echo "delete button was pressed and there was an existing record<br />"; $sql = "DELETE FROM degree WHERE DegreeId=".$_POST['DegreeId']; mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM education WHERE EducationId=".$_POST['EducationId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; mysql_query($sql) or die(mysql_error()); header("Location: ".$path['dirname']."/education.php"); exit(); } } break; case "personal.php": //Need the PersonId from the usr table $sql = "SELECT PersonId FROM usr WHERE UserId = '".$_SESSION['Login']."'"; $resultset = @mysql_query($sql); $result = @mysql_fetch_assoc($resultset); $table = "person"; $updateWhere = "PersonId = ".$result['PersonId']; $existingRecord = true; if(saveData($table,array_keys($HTTP_POST_VARS),$HTTP_POST_VARS,$updateWhere,$existingRecord,"ResumeId",$_SESSION['ResumeId'])) $_SESSION['existingRecord']=true; break; case "objective.php": $table = $_SESSION['table']; $existingRecord = $_SESSION['existingRecord']; $updateWhere = "ResumeId = ".$_SESSION['ResumeId']; if(saveData($table,array_keys($HTTP_POST_VARS),$HTTP_POST_VARS,$updateWhere,$existingRecord,"ResumeId",$_SESSION['ResumeId'])) $_SESSION['existingRecord']=true; break; case "summary.php": $table = $_SESSION['table']; if(isset($_POST['addKeyword'])) { echo "Adding keyword"; $sql = "INSERT INTO summary (SummaryType,ResumeId) VALUES ('K',".$_SESSION['ResumeId'].")"; @mysql_query($sql); } if(isset($_POST['deleteKeywords'])) { deleteArray("summary","SummaryId"); } updateArray(); break; case "employmentHistoryDetail.php": echo "employmentHistoryDetail Case<br />"; $existingrecord = $_SESSION['existingRecord']; if(!isset($_POST['deleteButton']) && !isset($_POST['cancelButton'])) { echo "save button was selected<br />"; if($existingrecord) { $sql = "UPDATE employment ". "SET ". "StartDate = '".$_POST['Start_Date']."',". "EndDate = '".$_POST['End_Date']."',". "EmployerId = ".$_POST['OrganizationId']." ". "WHERE EmploymentId = ".$_POST['EmploymentId']." ". "LIMIT 1"; mysql_query($sql) or die(mysql_error()); $sql = "UPDATE job ". "SET ". "StartDate = '".$_POST['Start_Date']."',". "EndDate = '".$_POST['End_Date']."',". "RoleId = ".$_POST['RoleId'].",". "Title = '".$_POST['Title']."',". "Description = '".$_POST['Description']."',". "OrganizationId = ".$_POST['ClientId'].",". "EmploymentId = ".$_POST['EmploymentId']." ". "WHERE JobId=".$_POST['JobId']." ". "LIMIT 1"; mysql_query($sql) or die(mysql_error()); //now the achievement array of fields $table="achievement"; updateArray(); if(isset($_POST['deleteAchievements'])) { deleteArray("achievement","AchievementId"); } if(isset($_POST['addAchievement'])) { $sql = "INSERT INTO achievement (JobId) VALUES (".$_POST['JobId'].")"; mysql_query($sql) or die(mysql_error()); } } else { $sql = "INSERT INTO employment ". "(StartDate,EndDate,EmployerId,ResumeId)". "VALUES ". "('".$_POST['Start_Date']."','".$_POST['End_Date']."',".$_POST['OrganizationId'].",".$_SESSION['ResumeId'].")"; mysql_query($sql) or die(mysql_error()); $sql = "INSERT INTO job ". "(StartDate,EndDate,RoleId,Title,Description,OrganizationId,EmploymentId)". "VALUES ". "('".$_POST['Start_Date']."','".$_POST['End_Date']."',".$_POST['RoleId'].",'".$_POST['Title']."','".$_POST['Description']."',".$_POST['ClientId'].",".mysql_insert_id($GLOBALS['link_identifier']).")"; mysql_query($sql) or die(mysql_error()); } } else { echo "cancel or delete button was selected<br />"; if(isset($_POST['deleteButton']) && $existingrecord==true) { echo "delete button was pressed and there was an existing record<br />"; $sql = "DELETE FROM achievement WHERE JobId=".$_POST['JobId']; mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM job WHERE JobId=".$_POST['JobId']." AND EmploymentId=".$_POST['EmploymentId']." LIMIT 1"; mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM employment WHERE EmploymentId = ".$_POST['EmploymentId']." AND ResumeId=".$_SESSION['ResumeId']." LIMIT 1"; mysql_query($sql) or die(mysql_error()); } header("Location: ".$path['dirname']."/employment.php"); exit(); } break; default: //UNKNOWN break; } if(!$debug) header("Location: ".$_SERVER['HTTP_REFERER']); function updateArray() { /* we have multiple Update commands that need to take place */ $updateFields = explode(",",$_POST['_updateArray']); for($i=0;$i<$_POST['_updateArrayCount'];$i++) { if($_POST[$_POST['_updateWhere']."__".$i]=="") $existingRecord = false; else $existingRecord = true; $updateWhere = $_POST['_updateWhere']."=".$_POST[$_POST['_updateWhere']."__".$i]; for($j=0;$j<count($updateFields);$j++) { $form_values[$updateFields[$j]] = $_POST[$updateFields[$j]."__".$i]; } if(!saveData($GLOBALS['table'],$updateFields,$form_values,$updateWhere,$existingRecord,"ResumeId",$_SESSION['ResumeId'])) echo mysql_error(); } } function deleteArray($table,$keyField) { for($i=0;$i<$_POST['_updateArrayCount'];$i++) { if(isset($_POST['Delete__'.$i])) { $sql = "DELETE FROM ".$table." WHERE ".$keyField." = ".$_POST[$keyField.'__'.$i]; @mysql_query($sql); } } } function saveData($table,$form_fields,$form_values,$updateWhere,$existingRecord=true,$foreignKeyField,$foreignKeyValue) { //We are ready to go... lets insert/update data $update_statement = "UPDATE ".$table." SET "; $update_definition = ""; $insert_statement = "INSERT INTO ".$table."("; $insert_definition = " VALUES ("; for ($i = 0; $i < sizeof($form_fields); $i++) { $thisField = $form_fields[$i]; $cleanField = ereg_replace(":","",$thisField); $thisValue = $form_values[$thisField]; if($thisValue=='') $thisValue = "NULL"; else if(substr($thisField,strlen($thisField)-2,2)!="Id") $thisValue = "'".$thisValue."'"; $update_definition = $update_definition.$cleanField."=".$thisValue.","; $insert_statement .= $cleanField.","; $insert_definition = $insert_definition.$thisValue.","; } $insert_statement = $insert_statement.$foreignKeyField.")".$insert_definition.$foreignKeyValue.")"; $update_definition = trim($update_definition,",")." WHERE ".$updateWhere; $update_statement = $update_statement.$update_definition." LIMIT 1"; if($existingRecord) $sql = $update_statement; else $sql = $insert_statement; $result = mysql_query($sql); echo $sql; if(!$result) echo mysql_error(); return $result; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Saving</title> </head> <body> <?php echo $_SESSION['table']; ?> </body> </html> \ No newline at end of file diff --git a/sidebar.php b/sidebar.php index 232f43cacc738b80fc7ac36aadcacdb996be4a03..08cc202ebaf933c955eb354bc3f5d30c77f25626 100644 --- a/sidebar.php +++ b/sidebar.php @@ -1 +1 @@ -<ul> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/personal.php") echo "class='currpage'"; ?>><a href="personal.php">Personal</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/objective.php") echo "class='currpage'"; ?>><a href="objective.php">Objective</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/summary.php") echo "class='currpage'"; ?>><a href="summary.php">Summary</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/employment.php") echo "class='currpage'"; ?>><a href="employment.php">Employment</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/education.php") echo "class='currpage'"; ?>><a href="education.php">Education</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/PublicationList.php") echo "class='currpage'"; ?>><a href="PublicationList.php">Publications</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/skills.php") echo "class='currpage'"; ?>><a href="skills.php">Skills</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/ReferencesList.php") echo "class='currpage'"; ?>><a href="ReferencesList.php">References</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/AwardList.php") echo "class='currpage'"; ?>><a href="AwardList.php">Awards</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/MembershipList.php") echo "class='currpage'"; ?>><a href="MembershipList.php">Memberships</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/AdditionalInfo.php") echo "class='currpage'"; ?>><a href="AdditionalInfo.php">Additional</a></li> <li <? if($_SERVER['SCRIPT_NAME']=="/mycv/") echo "class='currpage'"; ?>>myCV Account</li> </ul> \ No newline at end of file +<ul> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/personal.php") echo "class='currpage'"; ?>><a href="personal.php">Personal</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/objective.php") echo "class='currpage'"; ?>><a href="objective.php">Objective</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/summary.php") echo "class='currpage'"; ?>><a href="summary.php">Summary</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/employment.php") echo "class='currpage'"; ?>><a href="employment.php">Employment</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/education.php") echo "class='currpage'"; ?>><a href="education.php">Education</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/PublicationList.php") echo "class='currpage'"; ?>><a href="PublicationList.php">Publications</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/skills.php") echo "class='currpage'"; ?>><a href="skills.php">Skills</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/ReferencesList.php") echo "class='currpage'"; ?>><a href="ReferencesList.php">References</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/AwardList.php") echo "class='currpage'"; ?>><a href="AwardList.php">Awards</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/MembershipList.php") echo "class='currpage'"; ?>><a href="MembershipList.php">Memberships</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/AdditionalInfo.php") echo "class='currpage'"; ?>><a href="AdditionalInfo.php">Additional</a></li> <li <?php if($_SERVER['SCRIPT_NAME']=="/mycv/") echo "class='currpage'"; ?>>myCV Account</li></ul> \ No newline at end of file diff --git a/skills.php b/skills.php index a763752f031d2bba1aeb4ad3bda30081f85373b1..cae5b9e8e390d25fc9ce349ebd4e66083a2521a3 100644 --- a/skills.php +++ b/skills.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require("cv.functions.php"); $displaySaveandDel = false; $skillsSection = new cvSection("Skills"); $saoption = optionGenerator("skill_area","Description","SkillAreaId","SkillAreaId",$_GET['id'],true); $skillsSection->cvFields[0] = new cvField("Skill Area",$inputObjects = array(new formOptionObject("SkillAreaId",$saoption),"<a href='DropDownLookup.php?table=skill_area'>Edit List</a>")); $skillsSection->cvFields[0]->inputObjects[0]->jumpMenu=true; $soption = optionGenerator("skill_item","Description","SkillItemId","Description","",false,"WHERE SkillAreaId=".$_GET['id']); $skillsSection->cvFields[1] = new cvField("Skill",$inputObjects = array( new formOptionObject("SkillItemId",$soption), "<a href='DropDownLookup.php?table=skill_item&id=".$_GET['id']."'>Edit List</a>", new formInputObject("_updateArray","hidden","Proficiency,Description"), new formInputObject("_updateWhere","hidden","SkillId"))); $cells = array( array("Skill Area","Skill","Proficiency","Comments","Sel")); $sql = "SELECT ". "skill_area.Description AS skillarea,". "skill_item.Description AS skill,". "skill.Description AS comments,". "skill.Proficiency AS proficiency,". "skill.SkillItemId AS skillitemid,". "skill.SkillId AS skillid ". "FROM skill,skill_area,skill_item ". "WHERE skill_item.SkillAreaId=skill_area.SkillAreaId AND skill.SkillItemId=skill_item.SkillItemId AND skill.ResumeId=".$_SESSION['ResumeId']." ". "ORDER BY skill_area.Description"; $sresult = mysql_query($sql); $i=1; $h=0; if(mysql_num_rows($sresult)>=1) { $displaySaveandDel = true; while($srow = @mysql_fetch_assoc($sresult)) { //proficiency fields $profObjects = array(); $profObjects[0] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[0]->label = 1; $profObjects[1] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[1]->label = 2; $profObjects[2] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[2]->label = 3; $profObjects[3] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[3]->label = 4; $profObjects[4] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[4]->label = 5; $cells[$i] = array( $srow['skillarea']); $cells[$i+1] = array( "", $srow['skill'], new cvField("",$profObjects), new cvField("",$inputObjects = array(new formInputObject("Description__".$h,"text",$srow['comments']))), new cvField("",$inputObjects = array(new formInputObject("Delete__".$h,"checkbox"),new formInputObject("SkillId__".$h,"hidden",$srow['skillid'])))); $h++; $i=$i+2; } @mysql_free_result($sresult); } $skillsSection->cvFields[2] = new cvTableField("skilltable",$cells); $skillsSection->cvFields[3] = new formInputObject("_updateArrayCount","hidden",$h); $skillsPage = new cvPage("Skills",array($skillsSection)); $skillsPage->displayDeleteButton = $skillsPage->displayAddButton = $displaySaveandDel; $skillsPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); require("cv.functions.php"); $displaySaveandDel = false; $skillsSection = new cvSection("Skills"); $saoption = optionGenerator("skill_area","Description","SkillAreaId","SkillAreaId",$_GET['id'],true); $skillsSection->cvFields[0] = new cvField("Skill Area",$inputObjects = array(new formOptionObject("SkillAreaId",$saoption),"<a href='DropDownLookup.php?table=skill_area'>Edit List</a>")); $skillsSection->cvFields[0]->inputObjects[0]->jumpMenu=true; $soption = optionGenerator("skill_item","Description","SkillItemId","Description","",false,"WHERE SkillAreaId=".$_GET['id']); $skillsSection->cvFields[1] = new cvField("Skill",$inputObjects = array( new formOptionObject("SkillItemId",$soption), "<a href='DropDownLookup.php?table=skill_item&id=".$_GET['id']."'>Edit List</a>", new formInputObject("_updateArray","hidden","Proficiency,Description"), new formInputObject("_updateWhere","hidden","SkillId"))); $cells = array( array("Skill Area","Skill","Proficiency","Comments","Sel")); $sql = "SELECT ". "skill_area.Description AS skillarea,". "skill_item.Description AS skill,". "skill.Description AS comments,". "skill.Proficiency AS proficiency,". "skill.SkillItemId AS skillitemid,". "skill.SkillId AS skillid ". "FROM skill,skill_area,skill_item ". "WHERE skill_item.SkillAreaId=skill_area.SkillAreaId AND skill.SkillItemId=skill_item.SkillItemId AND skill.ResumeId=".$_SESSION['ResumeId']." ". "ORDER BY skill_area.Description"; $sresult = mysql_query($sql); $i=1; $h=0; if(mysql_num_rows($sresult)>=1) { $displaySaveandDel = true; while($srow = @mysql_fetch_assoc($sresult)) { //proficiency fields $profObjects = array(); $profObjects[0] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[0]->label = 1; $profObjects[1] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[1]->label = 2; $profObjects[2] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[2]->label = 3; $profObjects[3] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[3]->label = 4; $profObjects[4] = new formInputObject("Proficiency__".$h,"radio",$srow["proficiency"]); $profObjects[4]->label = 5; $cells[$i] = array( $srow['skillarea']); $cells[$i+1] = array( "", $srow['skill'], new cvField("",$profObjects), new cvField("",$inputObjects = array(new formInputObject("Description__".$h,"text",$srow['comments']))), new cvField("",$inputObjects = array(new formInputObject("Delete__".$h,"checkbox"),new formInputObject("SkillId__".$h,"hidden",$srow['skillid'])))); $h++; $i=$i+2; } @mysql_free_result($sresult); } $skillsSection->cvFields[2] = new cvTableField("skilltable",$cells); $skillsSection->cvFields[3] = new formInputObject("_updateArrayCount","hidden",$h); $skillsPage = new cvPage("Skills",array($skillsSection)); $skillsPage->displayDeleteButton = $skillsPage->displayAddButton = $displaySaveandDel; $skillsPage->display(); ?> \ No newline at end of file diff --git a/summary.php b/summary.php index dbc188fece15d7e7c5dd01e01522683889f6ae4e..2b805e3b5eeee6d4a82967382367447f181596a4 100644 --- a/summary.php +++ b/summary.php @@ -1 +1 @@ -<? require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); ini_set("display_errors",true); $_SESSION['table'] = "summary"; $sql = "SELECT Description, SummaryId FROM summary WHERE SummaryType='S' AND ResumeId = ".$_SESSION['ResumeId']; $sresult = @mysql_query($sql); if(@mysql_num_rows($sresult) == 1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $srow = @mysql_fetch_assoc($sresult); $summarySection = new cvSection("Summary"); $summarySection->cvFields[0] = new cvField("",$inputObjects = array( new formInputObject("_updateArray","hidden","Description,SummaryType"), new formInputObject("_updateWhere","hidden","SummaryId"), new formInputObject("Description__0","textarea",$srow['Description'],100), new formInputObject("SummaryId__0","hidden",$srow['SummaryId']), new formInputObject("SummaryType__0","hidden","S"))); @mysql_free_result($sresult); $summarySection->cvFields[0]->inputObjects[2]->height=20; $i=1; $keywordsSection = new cvSection("Keywords"); $keywordsSection->cvFields[0] = new cvField("",$inputObjects = array(new formInputObject("addKeyword","submit","Add"))); $sql = "SELECT * FROM summary WHERE SummaryType='K' AND ResumeId=".$_SESSION['ResumeId']; $kresult = mysql_query($sql); if(mysql_num_rows($kresult)>=1) { $keywordsSection->cvFields[0]->inputObjects[1] = new formInputObject("deleteKeywords","submit","Delete"); while($krow = mysql_fetch_assoc($kresult)) { $keywordsSection->cvFields[$i] = new cvField("",$inputObjects = array( new formInputObject("Description__".$i,"text",$krow['Description']), new formInputObject("Delete__".$i,"checkbox","delete"), new formInputObject("SummaryId__".$i,"hidden",$krow['SummaryId']), new formInputObject("SummaryType__".$i,"hidden","K"))); $i++; } } /* the _updateArrayCount field will tell the 'save' page how many fields to check for and update */ $keywordsSection->cvFields[$i] = new cvField("",$inputObjects = array(new formInputObject("_updateArrayCount","hidden",$i))); $summaryPage = new cvPage("summary",array($summarySection,$keywordsSection)); $summaryPage->display(); ?> \ No newline at end of file +<?php require_once("auth/authcheck.php"); require_once("/Library/WebServer/Documents/mycv/jcvDB.php"); require("cv.class.php"); ini_set("display_errors",true); $_SESSION['table'] = "summary"; $sql = "SELECT Description, SummaryId FROM summary WHERE SummaryType='S' AND ResumeId = ".$_SESSION['ResumeId']; $sresult = @mysql_query($sql); if(@mysql_num_rows($sresult) == 1) $_SESSION['existingRecord'] = true; else $_SESSION['existingRecord'] = false; $srow = @mysql_fetch_assoc($sresult); $summarySection = new cvSection("Summary"); $summarySection->cvFields[0] = new cvField("",$inputObjects = array( new formInputObject("_updateArray","hidden","Description,SummaryType"), new formInputObject("_updateWhere","hidden","SummaryId"), new formInputObject("Description__0","textarea",$srow['Description'],100), new formInputObject("SummaryId__0","hidden",$srow['SummaryId']), new formInputObject("SummaryType__0","hidden","S"))); @mysql_free_result($sresult); $summarySection->cvFields[0]->inputObjects[2]->height=20; $i=1; $keywordsSection = new cvSection("Keywords"); $keywordsSection->cvFields[0] = new cvField("",$inputObjects = array(new formInputObject("addKeyword","submit","Add"))); $sql = "SELECT * FROM summary WHERE SummaryType='K' AND ResumeId=".$_SESSION['ResumeId']; $kresult = mysql_query($sql); if(mysql_num_rows($kresult)>=1) { $keywordsSection->cvFields[0]->inputObjects[1] = new formInputObject("deleteKeywords","submit","Delete"); while($krow = mysql_fetch_assoc($kresult)) { $keywordsSection->cvFields[$i] = new cvField("",$inputObjects = array( new formInputObject("Description__".$i,"text",$krow['Description']), new formInputObject("Delete__".$i,"checkbox","delete"), new formInputObject("SummaryId__".$i,"hidden",$krow['SummaryId']), new formInputObject("SummaryType__".$i,"hidden","K"))); $i++; } } /* the _updateArrayCount field will tell the 'save' page how many fields to check for and update */ $keywordsSection->cvFields[$i] = new cvField("",$inputObjects = array(new formInputObject("_updateArrayCount","hidden",$i))); $summaryPage = new cvPage("summary",array($summarySection,$keywordsSection)); $summaryPage->display(); ?> \ No newline at end of file