本文整理汇总了PHP中doHeader函数的典型用法代码示例。如果您正苦于以下问题:PHP doHeader函数的具体用法?PHP doHeader怎么用?PHP doHeader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了doHeader函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showsaveform
function showsaveform()
{
//Show 'SAVE FORM' only when click the 'Save so far' button the first time, or when duplicate is found on SAVE FORM.
global $errormsg, $thissurvey, $surveyid, $clang, $clienttoken, $thisstep;
$redata = compact(array_keys(get_defined_vars()));
$sTemplatePath = $_SESSION['survey_' . $surveyid]['templatepath'];
sendCacheHeaders();
doHeader();
echo templatereplace(file_get_contents($sTemplatePath . "startpage.pstpl"), array(), $redata);
echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n" . "\t<script type='text/javascript'>\n" . "\t<!--\n" . "function checkconditions(value, name, type, evt_type)\n" . "\t{\n" . "\t}\n" . "\t//-->\n" . "\t</script>\n\n";
echo CHtml::form(array("/survey/index"), 'post') . "\n";
//PRESENT OPTIONS SCREEN
if (isset($errormsg) && $errormsg != "") {
$errormsg .= "<p>" . $clang->gT("Please try again.") . "</p>";
}
echo templatereplace(file_get_contents($sTemplatePath . "save.pstpl"), array(), $redata);
//END
echo "<input type='hidden' name='sid' value='{$surveyid}' />\n";
echo "<input type='hidden' name='thisstep' value='{$thisstep}' />\n";
echo CHtml::hiddenField('token', $clienttoken) . "\n";
echo "<input type='hidden' name='saveprompt' value='Y' />\n";
echo "</form>";
echo templatereplace(file_get_contents($sTemplatePath . "endpage.pstpl"), array(), $redata);
echo "</html>\n";
exit;
}
示例2: showsaveform
function showsaveform()
{
//Show 'SAVE FORM' only when click the 'Save so far' button the first time, or when duplicate is found on SAVE FORM.
global $thistpl, $errormsg, $thissurvey, $surveyid, $clang, $clienttoken, $relativeurl, $thisstep;
sendcacheheaders();
doHeader();
foreach (file("{$thistpl}/startpage.pstpl") as $op) {
echo templatereplace($op);
}
echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n" . "\t<script type='text/javascript'>\n" . "\t<!--\n" . "function checkconditions(value, name, type, evt_type)\n" . "\t{\n" . "\t}\n" . "\t//-->\n" . "\t</script>\n\n";
echo "<form method='post' action='{$relativeurl}/index.php'>\n";
//PRESENT OPTIONS SCREEN
if (isset($errormsg) && $errormsg != "") {
$errormsg .= "<p>" . $clang->gT("Please try again.") . "</p>";
}
foreach (file("{$thistpl}/save.pstpl") as $op) {
echo templatereplace($op);
}
//END
echo "<input type='hidden' name='sid' value='{$surveyid}' />\n";
echo "<input type='hidden' name='thisstep' value='", $thisstep, "' />\n";
echo "<input type='hidden' name='token' value='", $clienttoken, "' />\n";
echo "<input type='hidden' name='saveprompt' value='Y' />\n";
echo "</form>";
foreach (file("{$thistpl}/endpage.pstpl") as $op) {
echo templatereplace($op);
}
echo "</html>\n";
exit;
}
示例3: _renderHtml
private function _renderHtml($html, $thistpl, $aSurveyInfo)
{
sendCacheHeaders();
doHeader();
$aSupportData = array('thissurvey' => $aSurveyInfo);
echo templatereplace(file_get_contents($thistpl . DIRECTORY_SEPARATOR . 'startpage.pstpl'), array(), $aSupportData);
$aData['html'] = $html;
$aData['thistpl'] = $thistpl;
$this->render('/opt_view', $aData);
echo templatereplace(file_get_contents($thistpl . DIRECTORY_SEPARATOR . 'endpage.pstpl'), array(), $aSupportData);
doFooter();
}
示例4: _renderHtml
private function _renderHtml($html, $thistpl, $aSurveyInfo)
{
sendCacheHeaders();
doHeader();
$aSupportData = array('thissurvey' => $aSurveyInfo);
$oTemplate = Template::model()->getInstance();
$sTemplatePath = $oTemplate->path;
$thistpl = $oTemplate->viewPath;
echo templatereplace(file_get_contents($thistpl . 'startpage.pstpl'), array(), $aSupportData);
$aData['html'] = $html;
$aData['thistpl'] = $thistpl;
$this->render('/opt_view', $aData);
echo templatereplace(file_get_contents($thistpl . 'endpage.pstpl'), array(), $aSupportData);
doFooter();
}
示例5: _renderHtml
private function _renderHtml($html, $thistpl, $aSurveyInfo)
{
sendCacheHeaders();
doHeader();
$aSupportData = array('thissurvey' => $aSurveyInfo);
// $oTemplate is a global variable defined in controller/survey/index
global $oTemplate;
$sTemplatePath = $oTemplate->path;
$thistpl = $oTemplate->viewPath;
echo templatereplace(file_get_contents($thistpl . 'startpage.pstpl'), array(), $aSupportData);
$aData['html'] = $html;
$aData['thistpl'] = $thistpl;
$this->render('/opt_view', $aData);
echo templatereplace(file_get_contents($thistpl . 'endpage.pstpl'), array(), $aSupportData);
doFooter();
}
示例6: _renderHtml
/**
* Render stuff
*
* @param string $html
* @param array $aSurveyInfo
* @param int $iSurveyID
* @return void
*/
private function _renderHtml($html, $aSurveyInfo, $iSurveyID)
{
sendCacheHeaders();
doHeader();
$aSupportData = array('thissurvey' => $aSurveyInfo);
$oTemplate = Template::model()->getInstance(null, $iSurveyID);
if ($oTemplate->cssFramework == 'bootstrap') {
App()->bootstrap->register();
}
$thistpl = $oTemplate->viewPath;
echo templatereplace(file_get_contents($thistpl . 'startpage.pstpl'), array(), $aSupportData);
$aData['html'] = $html;
$aData['thistpl'] = $thistpl;
$this->render('/opt_view', $aData);
echo templatereplace(file_get_contents($thistpl . 'endpage.pstpl'), array(), $aSupportData);
doFooter();
}
示例7: run
function run($args)
{
extract($args);
$redata = compact(array_keys(get_defined_vars()));
$sTemplatePath = $_SESSION['survey_' . $surveyid]['templatepath'];
sendCacheHeaders();
doHeader();
echo templatereplace(file_get_contents($sTemplatePath . "startpage.pstpl"), array(), $redata);
echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n" . "\t<script type='text/javascript'>\n" . "function checkconditions(value, name, type, evt_type)\n" . "\t{\n" . "\t}\n" . "\t</script>\n\n";
echo CHtml::form(array("/survey/index", "sid" => $surveyid), 'post') . "\n";
echo templatereplace(file_get_contents($sTemplatePath . "load.pstpl"), array(), $redata);
//PRESENT OPTIONS SCREEN (Replace with Template Later)
//END
echo "<input type='hidden' name='loadall' value='reload' />\n";
if (isset($clienttoken) && $clienttoken != "") {
echo "<input type='hidden' name='token' value='{$clienttoken}' />\n";
}
echo "</form>";
echo templatereplace(file_get_contents($sTemplatePath . "endpage.pstpl"), array(), $redata);
doFooter();
exit;
}
示例8: loginUser
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// $Id: index.php,v 1.7 2006/01/29 08:59:18 atrommer Exp $
$bGoodUser = true;
if ($_POST['isPostback']) {
$bGoodUser = loginUser($_POST['tbUsername'], $_POST['tbPass']);
}
if (isset($_SESSION['USERNAME'])) {
redirect("mySchedule.php");
}
doHeader("Please Login", null, "self.focus(); document.frmLogin.tbUsername.focus();");
?>
<?php
if (!$bGoodUser) {
print "<span class=errorMsg>Login Failed! Please try again!</span>";
}
?>
<form action="<?php
print $_SERVER['PHP_SELF'];
?>
" method="post" name="frmLogin" id="frmLogin">
<input name="tbUsername" type="text" id="tbUsername" value="" tabindex="1">
<input name="tbPass" type="password" id="tbPass" value="" tabindex="2">
<input type="submit" name="Submit" value="Log In" tabindex="3">
<input name="isPostback" type="hidden" id="isPostback" value="1">
示例9: actionView
/**
* printanswers::view()
* View answers at the end of a survey in one place. To export as pdf, set 'usepdfexport' = 1 in lsconfig.php and $printableexport='pdf'.
* @param mixed $surveyid
* @param bool $printableexport
* @return
*/
function actionView($surveyid, $printableexport = FALSE)
{
Yii::app()->loadHelper("frontend");
Yii::import('application.libraries.admin.pdf');
$iSurveyID = (int) $surveyid;
$sExportType = $printableexport;
Yii::app()->loadHelper('database');
if (isset($_SESSION['survey_' . $iSurveyID]['sid'])) {
$iSurveyID = $_SESSION['survey_' . $iSurveyID]['sid'];
} else {
//die('Invalid survey/session');
}
// Get the survey inforamtion
// Set the language for dispay
if (isset($_SESSION['survey_' . $iSurveyID]['s_lang'])) {
$sLanguage = $_SESSION['survey_' . $iSurveyID]['s_lang'];
} elseif (Survey::model()->findByPk($iSurveyID)) {
$sLanguage = Survey::model()->findByPk($iSurveyID)->language;
} else {
$iSurveyID = 0;
$sLanguage = Yii::app()->getConfig("defaultlang");
}
$clang = SetSurveyLanguage($iSurveyID, $sLanguage);
$aSurveyInfo = getSurveyInfo($iSurveyID, $sLanguage);
//SET THE TEMPLATE DIRECTORY
if (!isset($aSurveyInfo['templatedir']) || !$aSurveyInfo['templatedir']) {
$aSurveyInfo['templatedir'] = Yii::app()->getConfig('defaulttemplate');
}
$sTemplate = validateTemplateDir($aSurveyInfo['templatedir']);
//Survey is not finished or don't exist
if (!isset($_SESSION['survey_' . $iSurveyID]['finished']) || !isset($_SESSION['survey_' . $iSurveyID]['srid'])) {
sendCacheHeaders();
doHeader();
echo templatereplace(file_get_contents(getTemplatePath($sTemplate) . '/startpage.pstpl'), array());
echo "<center><br />\n" . "\t<font color='RED'><strong>" . $clang->gT("Error") . "</strong></font><br />\n" . "\t" . $clang->gT("We are sorry but your session has expired.") . "<br />" . $clang->gT("Either you have been inactive for too long, you have cookies disabled for your browser, or there were problems with your connection.") . "<br />\n" . "\t" . sprintf($clang->gT("Please contact %s ( %s ) for further assistance."), Yii::app()->getConfig("siteadminname"), Yii::app()->getConfig("siteadminemail")) . "\n" . "</center><br />\n";
echo templatereplace(file_get_contents(getTemplatePath($sTemplate) . '/endpage.pstpl'), array());
doFooter();
exit;
}
//Fin session time out
$sSRID = $_SESSION['survey_' . $iSurveyID]['srid'];
//I want to see the answers with this id
//Ensure script is not run directly, avoid path disclosure
//if (!isset($rootdir) || isset($_REQUEST['$rootdir'])) {die( "browse - Cannot run this script directly");}
if ($aSurveyInfo['printanswers'] == 'N') {
die;
//Die quietly if print answers is not permitted
}
//CHECK IF SURVEY IS ACTIVATED AND EXISTS
$sSurveyName = $aSurveyInfo['surveyls_title'];
$sAnonymized = $aSurveyInfo['anonymized'];
//OK. IF WE GOT THIS FAR, THEN THE SURVEY EXISTS AND IT IS ACTIVE, SO LETS GET TO WORK.
//SHOW HEADER
$sOutput = CHtml::form(array("printanswers/view/surveyid/{$iSurveyID}/printableexport/pdf"), 'post') . "<center><input type='submit' value='" . $clang->gT("PDF export") . "'id=\"exportbutton\"/><input type='hidden' name='printableexport' /></center></form>";
if ($sExportType == 'pdf') {
//require (Yii::app()->getConfig('rootdir').'/application/config/tcpdf.php');
Yii::import('application.libraries.admin.pdf', true);
Yii::import('application.helpers.pdfHelper');
$aPdfLanguageSettings = pdfHelper::getPdfLanguageSettings($clang->langcode);
$oPDF = new pdf();
$oPDF->SetTitle($clang->gT("Survey name (ID)", 'unescaped') . ": {$sSurveyName} ({$iSurveyID})");
$oPDF->SetSubject($sSurveyName);
$oPDF->SetDisplayMode('fullpage', 'two');
$oPDF->setLanguageArray($aPdfLanguageSettings['lg']);
$oPDF->setHeaderFont(array($aPdfLanguageSettings['pdffont'], '', PDF_FONT_SIZE_MAIN));
$oPDF->setFooterFont(array($aPdfLanguageSettings['pdffont'], '', PDF_FONT_SIZE_DATA));
$oPDF->SetFont($aPdfLanguageSettings['pdffont'], '', $aPdfLanguageSettings['pdffontsize']);
$oPDF->AddPage();
$oPDF->titleintopdf($clang->gT("Survey name (ID)", 'unescaped') . ": {$sSurveyName} ({$iSurveyID})");
}
$sOutput .= "\t<div class='printouttitle'><strong>" . $clang->gT("Survey name (ID):") . "</strong> {$sSurveyName} ({$iSurveyID})</div><p> \n";
LimeExpressionManager::StartProcessingPage(true);
// means that all variables are on the same page
// Since all data are loaded, and don't need JavaScript, pretend all from Group 1
LimeExpressionManager::StartProcessingGroup(1, $aSurveyInfo['anonymized'] != "N", $iSurveyID);
$printanswershonorsconditions = Yii::app()->getConfig('printanswershonorsconditions');
$aFullResponseTable = getFullResponseTable($iSurveyID, $sSRID, $sLanguage, $printanswershonorsconditions);
//Get the fieldmap @TODO: do we need to filter out some fields?
if ($aSurveyInfo['datestamp'] != "Y" || $sAnonymized == 'Y') {
unset($aFullResponseTable['submitdate']);
} else {
unset($aFullResponseTable['id']);
}
unset($aFullResponseTable['token']);
unset($aFullResponseTable['lastpage']);
unset($aFullResponseTable['startlanguage']);
unset($aFullResponseTable['datestamp']);
unset($aFullResponseTable['startdate']);
$sOutput .= "<table class='printouttable' >\n";
foreach ($aFullResponseTable as $sFieldname => $fname) {
if (substr($sFieldname, 0, 4) == 'gid_') {
$sOutput .= "\t<tr class='printanswersgroup'><td colspan='2'>{$fname[0]}</td></tr>\n";
} elseif (substr($sFieldname, 0, 4) == 'qid_') {
//.........这里部分代码省略.........
示例10: _renderHtml
private function _renderHtml($html, $thistpl)
{
sendCacheHeaders();
doHeader();
$data['html'] = $html;
$data['thistpl'] = $thistpl;
$this->render('/opt_view', $data);
doFooter();
}
示例11: actionAction
//.........这里部分代码省略.........
break;
case "P":
//P - Multiple choice with comments
//P - Multiple choice with comments
case "M":
//M - Multiple choice
//M - Multiple choice
case "N":
//N - Numerical input
//N - Numerical input
case "D":
//D - Date
$myfield2 = $flt[2] . $myfield;
$allfields[] = $myfield2;
break;
default:
//Default settings
$allfields[] = $myfield;
break;
}
//end switch -> check question types and create filter forms
}
//end foreach -> loop through all questions with "public_statistics" enabled
}
// end if -> for removing the error message in case there are no filters
$summary = $allfields;
// Get the survey inforamtion
$thissurvey = getSurveyInfo($surveyid, $sLanguage);
//SET THE TEMPLATE DIRECTORY
$data['sTemplatePath'] = $surveyinfo['template'];
// surveyinfo=getSurveyInfo and if survey don't exist : stop before.
//---------- CREATE STATISTICS ----------
$redata = compact(array_keys(get_defined_vars()));
doHeader();
echo templatereplace(file_get_contents(getTemplatePath($data['sTemplatePath']) . DIRECTORY_SEPARATOR . "startpage.pstpl"), array(), $redata);
//some progress bar stuff
// Create progress bar which is shown while creating the results
$prb = new ProgressBar();
$prb->pedding = 2;
// Bar Pedding
$prb->brd_color = "#404040 #dfdfdf #dfdfdf #404040";
// Bar Border Color
$prb->setFrame();
// set ProgressBar Frame
$prb->frame['left'] = 50;
// Frame position from left
$prb->frame['top'] = 80;
// Frame position from top
$prb->addLabel('text', 'txt1', gT("Please wait ..."));
// add Text as Label 'txt1' and value 'Please wait'
$prb->addLabel('percent', 'pct1');
// add Percent as Label 'pct1'
$prb->addButton('btn1', gT('Go back'), '?action=statistics&sid=' . $iSurveyID);
// add Button as Label 'btn1' and action '?restart=1'
//progress bar starts with 35%
$process_status = 35;
$prb->show();
// show the ProgressBar
// 1: Get list of questions with answers chosen
//"Getting Questions and Answer ..." is shown above the bar
$prb->setLabelValue('txt1', gT('Getting questions and answers ...'));
$prb->moveStep(5);
// creates array of post variable names
for (reset($_POST); $key = key($_POST); next($_POST)) {
$postvars[] = $key;
}
示例12: display_first_page
/**
* Shows the welcome page, used in group by group and question by question mode
*/
function display_first_page()
{
global $token, $surveyid, $thissurvey, $navigator;
$totalquestions = $_SESSION['survey_' . $surveyid]['totalquestions'];
// Fill some necessary var for template
$aNavigator = surveymover();
$moveprevbutton = $aNavigator['sMovePrevButton'];
$movenextbutton = $aNavigator['sMoveNextButton'];
$navigator = $moveprevbutton . ' ' . $movenextbutton;
$sitename = Yii::app()->getConfig('sitename');
$languagechanger = makeLanguageChangerSurvey(App()->language);
sendCacheHeaders();
doHeader();
LimeExpressionManager::StartProcessingPage();
LimeExpressionManager::StartProcessingGroup(-1, false, $surveyid);
// start on welcome page
$redata = compact(array_keys(get_defined_vars()));
$oTemplate = Template::model()->getInstance('', $surveyid);
$sTemplatePath = $oTemplate->path;
$sTemplateViewPath = $oTemplate->viewPath;
echo templatereplace(file_get_contents($sTemplateViewPath . "startpage.pstpl"), array(), $redata, 'frontend_helper[2757]');
echo CHtml::form(array("/survey/index", "sid" => $surveyid), 'post', array('id' => 'limesurvey', 'name' => 'limesurvey', 'autocomplete' => 'off', 'class' => 'frontend_helper'));
echo templatereplace(file_get_contents($sTemplateViewPath . "welcome.pstpl"), array(), $redata, 'frontend_helper[2762]') . "\n";
if ($thissurvey['anonymized'] == "Y") {
echo templatereplace(file_get_contents($sTemplateViewPath . "/privacy.pstpl"), array(), $redata, 'frontend_helper[2765]') . "\n";
}
echo templatereplace(file_get_contents($sTemplateViewPath . "navigator.pstpl"), array(), $redata, 'frontend_helper[2767]');
echo "\n<input type='hidden' name='sid' value='{$surveyid}' id='sid' />\n";
if (isset($token) && !empty($token)) {
echo "\n<input type='hidden' name='token' value='{$token}' id='token' />\n";
}
echo "\n<input type='hidden' name='lastgroupname' value='_WELCOME_SCREEN_' id='lastgroupname' />\n";
//This is to ensure consistency with mandatory checks, and new group test
$loadsecurity = returnGlobal('loadsecurity', true);
if (isset($loadsecurity)) {
echo "\n<input type='hidden' name='loadsecurity' value='{$loadsecurity}' id='loadsecurity' />\n";
}
$_SESSION['survey_' . $surveyid]['LEMpostKey'] = mt_rand();
echo "<input type='hidden' name='LEMpostKey' value='{$_SESSION['survey_' . $surveyid]['LEMpostKey']}' id='LEMpostKey' />\n";
echo "<input type='hidden' name='thisstep' id='thisstep' value='0' />\n";
echo "<!--frontendhelper --></form>";
echo templatereplace(file_get_contents($sTemplateViewPath . "endpage.pstpl"), array(), $redata, 'frontend_helper[2782]');
echo LimeExpressionManager::GetRelevanceAndTailoringJavaScript();
LimeExpressionManager::FinishProcessingPage();
doFooter();
echo "<!-- end of frontend_helper / display_first_page -->";
}
示例13: display_first_page
/**
* Shows the welcome page, used in group by group and question by question mode
*/
function display_first_page()
{
global $token, $surveyid, $thissurvey, $navigator;
$totalquestions = $_SESSION['survey_' . $surveyid]['totalquestions'];
$clang = Yii::app()->lang;
// Fill some necessary var for template
$navigator = surveymover();
$sitename = Yii::app()->getConfig('sitename');
$languagechanger = makeLanguageChangerSurvey($clang->langcode);
sendCacheHeaders();
doHeader();
LimeExpressionManager::StartProcessingPage();
LimeExpressionManager::StartProcessingGroup(-1, false, $surveyid);
// start on welcome page
$redata = compact(array_keys(get_defined_vars()));
$sTemplatePath = $_SESSION['survey_' . $surveyid]['templatepath'];
echo templatereplace(file_get_contents($sTemplatePath . "startpage.pstpl"), array(), $redata, 'frontend_helper[2757]');
echo CHtml::form(array("/survey/index"), 'post', array('id' => 'limesurvey', 'name' => 'limesurvey', 'autocomplete' => 'off'));
echo "\n\n<!-- START THE SURVEY -->\n";
echo templatereplace(file_get_contents($sTemplatePath . "welcome.pstpl"), array(), $redata, 'frontend_helper[2762]') . "\n";
if ($thissurvey['anonymized'] == "Y") {
echo templatereplace(file_get_contents($sTemplatePath . "/privacy.pstpl"), array(), $redata, 'frontend_helper[2765]') . "\n";
}
echo templatereplace(file_get_contents($sTemplatePath . "navigator.pstpl"), array(), $redata, 'frontend_helper[2767]');
if ($thissurvey['active'] != "Y") {
echo "<p style='text-align:center' class='error'>" . $clang->gT("This survey is currently not active. You will not be able to save your responses.") . "</p>\n";
}
echo "\n<input type='hidden' name='sid' value='{$surveyid}' id='sid' />\n";
if (isset($token) && !empty($token)) {
echo "\n<input type='hidden' name='token' value='{$token}' id='token' />\n";
}
echo "\n<input type='hidden' name='lastgroupname' value='_WELCOME_SCREEN_' id='lastgroupname' />\n";
//This is to ensure consistency with mandatory checks, and new group test
$loadsecurity = returnGlobal('loadsecurity', true);
if (isset($loadsecurity)) {
echo "\n<input type='hidden' name='loadsecurity' value='{$loadsecurity}' id='loadsecurity' />\n";
}
$_SESSION['survey_' . $surveyid]['LEMpostKey'] = mt_rand();
echo "<input type='hidden' name='LEMpostKey' value='{$_SESSION['survey_' . $surveyid]['LEMpostKey']}' id='LEMpostKey' />\n";
echo "<input type='hidden' name='thisstep' id='thisstep' value='0' />\n";
echo "\n</form>\n";
echo templatereplace(file_get_contents($sTemplatePath . "endpage.pstpl"), array(), $redata, 'frontend_helper[2782]');
echo LimeExpressionManager::GetRelevanceAndTailoringJavaScript();
LimeExpressionManager::FinishProcessingPage();
doFooter();
}
示例14: emailEmps
if ($_POST['isPostback']) {
emailEmps($_POST, $_SESSION['USERID']);
redirect();
}
// grab based on usertype
// if >= super, get owned emps and all supers
// otherwise, only coworkers on parents
if ($_SESSION['USERTYPE'] > 1) {
// get super case
$oMyEmps = getMyEmployees($_SESSION['USERID']);
$oSupers = getSupervisors();
} else {
$oMyEmps = getMyCowork($_SESSION['USERID']);
$oSupers = getMySupers($_SESSION['USERID']);
}
doHeader("Bulk Email");
?>
Please enter the subject, body, and select all or some of the employees you would like to email.
<br/>
<form name="frmEmail" action="emailEmps.php" method="post">
<input type="hidden" name="isPostback" value="1">
<table border="0" cellpadding="1" cellspacing="0" width="100%" class="contactInfo">
<tr>
<td colspan=4 class="contactInfoName">Employees:</td>
</tr>
<?php
// first show the emps
// we want to only show 4 emps a line, so we'll hit another <tr> on 4
$iCount = 0;
print "<tr>\n";
foreach ($oMyEmps as $Emp) {
示例15: checkUser
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// $Id: viewSched.php,v 1.7 2005/10/30 22:37:19 atrommer Exp $
checkUser($_SESSION['USERTYPE'], 2);
if (empty($_REQUEST['user'])) {
// keep people from navigating here directly
accessDenied("Please choose a user first.");
}
$oEmp = getUserVals($_REQUEST['user']);
if (empty($oEmp)) {
// this would happen if they arbitrarily typed in a num in the url
accessDenied("You selected an invalid user!");
}
if (!$_REQUEST['doPop']) {
doHeader("Viewing {$oEmp->user_first} {$oEmp->user_last}'s schedule");
} else {
?>
<html>
<head>
<title>Viewing <?php
echo $oEmp->user_first . ' ' . $oEmp->user_last;
?>
's schedule</title>
<link href="global.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php
}
?>