本文整理汇总了PHP中feedback函数的典型用法代码示例。如果您正苦于以下问题:PHP feedback函数的具体用法?PHP feedback怎么用?PHP feedback使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了feedback函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: deleteDucks
function deleteDucks()
{
//echo "delete the ducks!";
startSession();
unset($_SESSION['ducks']);
feedback('Ducks deleted!');
}
开发者ID:bschwartz757,项目名称:PHP-MySQL,代码行数:7,代码来源:lab3-3.php
示例2: updateExecute
function updateExecute()
{
global $config;
if (isset($_POST['AdminID']) && (int) $_POST['AdminID'] > 0) {
$myID = (int) $_POST['AdminID'];
#Convert to integer, will equate to zero if fails
} else {
feedback("AdminID not numeric", "warning");
myRedirect($config->adminReset);
}
if (!onlyAlphaNum($_POST['PWord1'])) {
//data must be alphanumeric or punctuation only
feedback("Data entered for password must be alphanumeric only");
myRedirect(THIS_PAGE);
}
$myConn = conn('', FALSE);
$redirect = $config->adminReset;
# global var used for following formReq redirection on failure
$AdminID = formReq('AdminID');
# calls dbIn internally, to check form data
$AdminPW = formReq('PWord1');
# SHA() is the MySQL function that encrypts the password
$sql = sprintf("UPDATE " . PREFIX . "Admin set AdminPW=SHA('%s') WHERE AdminID=%d", $AdminPW, $AdminID);
@mysql_query($sql, $myConn) or die(trigger_error(mysql_error(), E_USER_ERROR));
//feedback success or failure of insert
if (mysql_affected_rows($myConn) > 0) {
feedback("Password Successfully Reset!", "notice");
} else {
feedback("Password NOT Reset! (or not changed from original value)");
}
get_header();
echo '
<div align="center"><h3>Reset Administrator Password</h3></div>
<div align="center"><a href="' . $config->adminReset . '">Reset More</a></div>
<div align="center"><a href="' . $config->adminDashboard . '">Exit To Admin</a></div>
';
get_footer();
}
开发者ID:bschwartz757,项目名称:PHP-MySQL,代码行数:38,代码来源:admin_reset.php
示例3: switch
exit;
}
include HCLANG . '/admin/admin.php';
if (isset($_GET['msg'])) {
switch ($_GET['msg']) {
case "1":
feedback(1, $hc_lang_admin['Feed03']);
break;
case "2":
feedback(3, $hc_lang_admin['Feed04']);
break;
case "3":
feedback(1, $hc_lang_admin['Feed05']);
break;
case "4":
feedback(1, $hc_lang_admin['Feed06']);
break;
}
}
appInstructions(0, "Editing_Admin_Users", $hc_lang_admin['TitleBrowseA'], $hc_lang_admin['InstructBrowseA']);
$result = doQuery("SELECT PkID, FirstName, LastName, Email, LastLogin FROM " . HC_TblPrefix . "admin WHERE IsActive = 1 AND SuperAdmin = 0 ORDER BY LastName, FirstName");
if (hasRows($result)) {
echo '
<ul class="data">
<li class="row header uline">
<div style="width:30%;">' . $hc_lang_admin['Name'] . '</div>
<div style="width:40%;">' . $hc_lang_admin['EmailLabel'] . '</div>
<div style="width:20%;">' . $hc_lang_admin['Login'] . '</div>
<div style="width:10%;"> </div>
</li>';
$cnt = 0;
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:AdminBrowse.php
示例4: switch
if (isset($_GET['msg'])) {
switch ($_GET['msg']) {
case "1":
feedback(1, $hc_lang_settings['Feed04']);
break;
case "2":
feedback(1, $hc_lang_settings['Feed06']);
break;
case "3":
feedback(3, $hc_lang_settings['Feed07']);
break;
case "4":
feedback(1, $hc_lang_settings['Feed08']);
break;
case "5":
feedback(3, $hc_lang_settings['Feed09']);
break;
}
}
appInstructions(0, "APIs", $hc_lang_settings['TitleAPI'], $hc_lang_settings['InstructAPI']);
$result = doQuery("SELECT SettingValue FROM " . HC_TblPrefix . "settings \r\n\t\t\t\t\tWHERE PkID IN (5,6,25,27,41,42,43,45,46,47,50,52,55,56,57,58,59,61,62,63,69,94,95,96,\r\n\t\t\t\t\t\t\t\t100,101,102,103,104,105,111,112,113,114,115,117,118,119,120,121,122,123,124,125)\r\n\t\t\t\t\tORDER BY PkID");
$eventbriteKeyA = cOut(mysql_result($result, 0, 0));
$eventbriteKeyU = cOut(mysql_result($result, 1, 0));
$disqusName = cOut(mysql_result($result, 2, 0));
$emapZoom = cOut(mysql_result($result, 3, 0));
$lmapZoom = cOut(mysql_result($result, 4, 0));
$locBrowse = cOut(mysql_result($result, 7, 0));
$twtrAToken = cOut(mysql_result($result, 8, 0));
$twtrASecret = cOut(mysql_result($result, 9, 0));
$quickLinks = explode(",", cOut(mysql_result($result, 10, 0)));
$googMapURL = cOut(mysql_result($result, 11, 0));
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:SettingsAPI.php
示例5: api_get_local_time
$dropbox_file_data[] = $receivers_celldata;
$last_upload_date = api_get_local_time($dropbox_file->last_upload_date);
$dropbox_file_data[] = date_to_str_ago($last_upload_date) . '<br /><span class="dropbox_date">' . api_format_date($last_upload_date) . '</span>';
//$dropbox_file_data[] = $dropbox_file->author;
$receivers_celldata = '';
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback) . ' ' . get_lang('Feedback') . '
<a href="' . api_get_self() . '?' . api_get_cidreq() . '&view_received_category=' . $viewReceivedCategory . '&view_sent_category=' . $viewSentCategory . '&view=' . $view . '&action=viewfeedback&id=' . $dropbox_file->id . '&' . $sort_params . '">' . Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL) . '</a>
<a href="' . api_get_self() . '?' . api_get_cidreq() . '&view_received_category=' . $viewReceivedCategory . '&view_sent_category=' . $viewSentCategory . '&view=' . $view . '&action=movesent&move_id=' . $dropbox_file->id . '&' . $sort_params . '">' . Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL) . '</a>
<a href="' . api_get_self() . '?' . api_get_cidreq() . '&view_received_category=' . $viewReceivedCategory . '&view_sent_category=' . $viewSentCategory . '&view=' . $view . '&action=deletesentfile&id=' . $dropbox_file->id . '&' . $sort_params . '" onclick="javascript: return confirmation(\'' . $dropbox_file->title . '\');">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>';
// This is a hack to have an additional row in a sortable table
if ($action == 'viewfeedback' && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) {
$action_icons .= "</td></tr>\n";
// ending the normal row of the sortable table
$action_icons .= "<tr><td colspan=\"2\">";
$action_icons .= "<a href=\"index.php?" . api_get_cidreq() . "&view_received_category=" . $viewReceivedCategory . "&view_sent_category=" . $viewSentCategory . "&view=" . $view . '&' . $sort_params . "\">" . get_lang('CloseFeedback') . "</a>";
$action_icons .= "</td><td colspan=\"7\">" . feedback($dropbox_file->feedback2) . "</td></tr>";
}
$dropbox_file_data[] = $action_icons;
$dropbox_file_data[] = $last_upload_date;
$dropbox_file_data[] = $file_size;
$action_icons = '';
$dropbox_data_sent[] = $dropbox_file_data;
}
}
// The content of the sortable table = the categories (if we are not in the root)
if ($view_dropbox_category_sent == 0) {
foreach ($dropbox_categories as $category) {
$dropbox_category_data = array();
if ($category['sent'] == '1') {
$dropbox_category_data[] = $category['cat_id'];
// This is where the checkbox icon for the files appear.
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:index.php
示例6: switch
++$bg;
$marty->assign('darkBG', $bg % 2);
switch ($val) {
case 'N':
$nam = new PName($key);
$nam->display('pers_ldat.tpl');
unset($nam);
break;
case 'P':
$pers = new Person($key);
$pers->display('pers_ldat.tpl');
unset($pers);
}
}
} else {
feedback(102, 'hinw');
// kein Ergebnis
}
}
break;
// Ende --search--
// Ende --search--
case "Pick":
$bg = 1;
foreach (PName::listNames($_GET['C']) as $wert) {
++$bg;
$marty->assign('darkBG', $bg % 2);
$pers = new PName($wert);
$pers->display('pers_ldat.tpl');
unset($pers);
}
开发者ID:knwetzig,项目名称:DiafIP-Reader,代码行数:31,代码来源:ev_person.php
示例7: insertExecute
function insertExecute()
{
//$FirstName = strip_tags($_POST['FirstName']);
//$LastName = strip_tags($_POST['LastName']);
//$Email = strip_tags($_POST['Email']);
$FirstName = $_POST['FirstName'];
$LastName = $_POST['LastName'];
$Email = $_POST['Email'];
$db = pdo();
# pdo() creates and returns a PDO object
//dumpDie($FirstName);
//PDO Quote has some great stuff re: injection:
//http://www.php.net/manual/en/pdo.quote.php
//next check for specific issues with data
/*
if(!ctype_graph($_POST['FirstName'])|| !ctype_graph($_POST['LastName']))
{//data must be alphanumeric or punctuation only
feedback("First and Last Name must contain letters, numbers or punctuation");
myRedirect(THIS_PAGE);
}
if(!onlyEmail($_POST['Email']))
{//data must be alphanumeric or punctuation only
feedback("Data entered for email is not valid");
myRedirect(THIS_PAGE);
}
*/
//build string for SQL insert with replacement vars, ?
$sql = "INSERT INTO test_Customers (FirstName, LastName, Email) VALUES (?,?,?)";
$stmt = $db->prepare($sql);
//INTEGER EXAMPLE $stmt->bindValue(1, $id, PDO::PARAM_INT);
$stmt->bindValue(1, $FirstName, PDO::PARAM_STR);
$stmt->bindValue(2, $LastName, PDO::PARAM_STR);
$stmt->bindValue(3, $Email, PDO::PARAM_STR);
try {
$stmt->execute();
} catch (PDOException $ex) {
trigger_error($ex->getMessage(), E_USER_ERROR);
}
#feedback success or failure of update
if ($stmt->rowCount() > 0) {
//success! provide feedback, chance to change another!
feedback("Customer Added Successfully!", "success");
} else {
//Problem! Provide feedback!
feedback("Customer NOT added!", "warning");
}
}
开发者ID:bschwartz757,项目名称:PHP-MySQL,代码行数:49,代码来源:demo_add_pdo.php
示例8: switch
return true;
}
}
//-->
</script>';
} else {
if (isset($_GET['msg'])) {
switch ($_GET['msg']) {
case "1":
feedback(1, $hc_lang_news['Feed10']);
break;
case "2":
feedback(1, $hc_lang_news['Feed11']);
break;
case "3":
feedback(1, $hc_lang_news['Feed12']);
break;
}
}
appInstructions(0, "Subscriber_Groups", $hc_lang_news['TitleGroup'], $hc_lang_news['InstructGroup']);
echo '
<a href="' . AdminRoot . '/index.php?com=subgrps&gID=0" class="add"><img src="' . AdminRoot . '/img/icons/add.png" width="16" height="16" alt="" />' . $hc_lang_news['NewGroup'] . '</a>';
$result = doQuery("SELECT PkID, Name, IsPublic,\r\n\t\t\t\t\t\t\t(SELECT COUNT(sg.UserID)\r\n\t\t\t\t\t\t\tFROM " . HC_TblPrefix . "subscribersgroups sg\r\n\t\t\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "subscribers s ON (sg.UserID = s.PkID)\r\n\t\t\t\t\t\t\tWHERE sg.GroupID = mg.PkID AND s.IsConfirm = 1) as GrpCnt,\r\n\t\t\t\t\t\t\t(SELECT COUNT(s.PkID)FROM " . HC_TblPrefix . "subscribers s WHERE s.IsConfirm = 1) as AllCnt\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "mailgroups mg\r\n\t\t\t\t\t\tWHERE IsActive = 1 ORDER BY IsPublic, Name");
if (hasRows($result)) {
echo '
<ul class="data">
<li class="row header uline">
<div style="width:50%;">' . $hc_lang_news['GroupNameLabel'] . '</div>
<div style="width:20%;">' . $hc_lang_news['GroupStatusLabel'] . '</div>
<div class="number" style="width:20%;">' . $hc_lang_news['GroupCountLabel'] . '</div>
<div class="tools" style="width:10%;"> </div>
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:MailGroups.php
示例9: cIn
if (isset($_GET['s']) && $_GET['s'] != '') {
$term = cIn(cleanQuotes(strip_tags($_GET['s'])));
$save = '&s=' . $term;
$queryS = " AND Name LIKE('%" . $term . "%')";
}
$hc_Side[] = array(CalRoot . '/index.php?com=location', 'map.png', $hc_lang_locations['LinkMap'], 1);
if (isset($_GET['msg'])) {
switch ($_GET['msg']) {
case "3":
feedback(1, $hc_lang_locations['Feed03']);
break;
case "4":
feedback(2, $hc_lang_locations['Feed04']);
break;
case "5":
feedback(1, $hc_lang_locations['Feed05']);
break;
}
}
appInstructions(0, "Editing_Locations", $hc_lang_locations['TitleBrowse'], $hc_lang_locations['InstructBrowse']);
$resultC = doQuery("SELECT COUNT(*) FROM " . HC_TblPrefix . "locations WHERE IsActive = 1 {$queryS}");
$pages = ceil(mysql_result($resultC, 0, 0) / $resLimit);
if ($pages <= $resOffset && $pages > 0) {
$resOffset = $pages - 1;
}
echo '
<fieldset style="border:0px;">
<label><b>' . $hc_lang_locations['ResPer'] . '</b></label>
<span class="output">';
for ($x = 25; $x <= 100; $x = $x + 25) {
echo $x > 25 ? ' | ' : '';
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:Location.php
示例10: header
<?php
/**
* @package Helios Calendar
* @license GNU General Public License version 2 or later; see LICENSE
*/
if (!defined('hcAdmin')) {
header("HTTP/1.1 403 No Direct Access");
exit;
}
include HCLANG . '/admin/settings.php';
if (isset($_GET['msg'])) {
switch ($_GET['msg']) {
case "1":
feedback(1, $hc_lang_settings['Feed03']);
break;
}
}
appInstructions(0, "Themes_Settings", $hc_lang_settings['TitleTheme'], $hc_lang_settings['InstructTheme']);
$result = doQuery("SELECT SettingValue FROM " . HC_TblPrefix . "settings WHERE PkID IN (83,84,86) ORDER BY PkID");
$fullsite = cOut(mysql_result($result, 0, 0));
$mobile = cOut(mysql_result($result, 1, 0));
$agents = cOut(mysql_result($result, 2, 0));
$fullsiteOpts = $mobileOpts = '';
$themes = array();
if (file_exists(HCPATH . '/themes')) {
$dir = dir(HCPATH . '/themes');
while (($file = $dir->read()) != false) {
if (is_dir($dir->path . '/' . $file) && $file != "." && $file != "..") {
$themes[] = $file;
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:SettingsTheme.php
示例11: sr_forms_news_signup
function sr_forms_news_signup()
{
global $hc_cfg, $hc_lang_config, $hc_lang_news, $hc_captchas, $hc_lang_core;
if (isset($_GET['d'])) {
$g = cIn(strip_tags($_GET['d']));
$result = doQuery("SELECT PkID FROM " . HC_TblPrefix . "subscribers WHERE GUID = '" . $g . "' AND GUID != '' AND IsConfirm = 1");
if (!hasRows($result)) {
return 0;
}
echo '
<p>' . $hc_lang_news['DeleteNotice'] . '</p>
<form name="frmEventNewsletter" id="frmEventNewsletter" method="post" action="' . CalRoot . '/news-edit.php">
<input name="dID" id="dID" type="hidden" value="' . $g . '" />
<div class="newsTools"><input type="submit" name="submit" id="submit" value="' . $hc_lang_news['CancelReg'] . '" /></div>
</form>';
return 0;
}
$t = isset($_GET['t']) && is_numeric($_GET['t']) ? cIn(strip_tags($_GET['t'])) : 0;
if (isset($hc_lang_news['ThankYou' . $t])) {
echo $hc_lang_news['ThankYou' . $t];
return 0;
}
$submit = $hc_lang_news['SubmitReg'];
$uID = $occupation = 0;
$format = 2;
$firstname = $lastname = $email = $zipcode = $birthyear = $gender = $refer = $yrOpts = '';
$query = NULL;
$g = isset($_GET['u']) && $_GET['u'] != '' ? cIn(strip_tags($_GET['u'])) : '';
$result = doQuery("SELECT * FROM " . HC_TblPrefix . "subscribers WHERE GUID = '" . $g . "' AND GUID != '' AND IsConfirm = 1");
$notice = $hc_lang_news['SubInstruct'];
if (hasRows($result)) {
$notice = $hc_lang_news['SubInstruct2'];
$submit = $hc_lang_news['UpdateReg'];
$uID = mysql_result($result, 0, 0);
$firstname = mysql_result($result, 0, 1);
$lastname = mysql_result($result, 0, 2);
$email = mysql_result($result, 0, 3);
$occupation = mysql_result($result, 0, 4);
$zipcode = mysql_result($result, 0, 5);
$addedby = mysql_result($result, 0, 8);
$birthyear = mysql_result($result, 0, 11);
$gender = mysql_result($result, 0, 12);
$refer = mysql_result($result, 0, 13);
$format = mysql_result($result, 0, 14);
$query = "SELECT c.PkID, c.CategoryName, c.ParentID, c.CategoryName as Sort, uc.UserID as Selected\r\n FROM " . HC_TblPrefix . "categories c\r\n LEFT JOIN " . HC_TblPrefix . "categories c2 ON (c.PkID = c2.PkID)\r\n LEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID)\r\n LEFT JOIN " . HC_TblPrefix . "subscriberscategories uc ON (uc.CategoryID = c.PkID AND uc.UserID = '" . $uID . "')\r\n WHERE c.ParentID = 0 AND c.IsActive = 1\r\n GROUP BY c.PkID, c.CategoryName, c.ParentID, uc.UserID\r\n UNION\r\n SELECT c.PkID, c.CategoryName, c.ParentID, c2.CategoryName as Sort, uc.UserID as Selected\r\n FROM " . HC_TblPrefix . "categories c\r\n LEFT JOIN " . HC_TblPrefix . "categories c2 ON (c.ParentID = c2.PkID)\r\n LEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID)\r\n LEFT JOIN " . HC_TblPrefix . "subscriberscategories uc ON (uc.CategoryID = c.PkID AND uc.UserID = '" . cIn($uID) . "')\r\n WHERE c.ParentID > 0 AND c.IsActive = 1\r\n GROUP BY c.PkID, c.CategoryName, c.ParentID, c2.CategoryName, uc.UserID\r\n ORDER BY Sort, ParentID, CategoryName";
}
if (isset($_GET['msg'])) {
switch ($_GET['msg']) {
case "1":
feedback(2, $hc_lang_news['Feed04']);
break;
}
}
$yearSU = date("Y") - 14;
for ($x = 0; $x <= 80; $x++) {
$yrOpts .= '<option' . ($yearSU == $birthyear ? ' selected="selected"' : '') . ' value="' . $yearSU . '">' . $yearSU . '</option>';
--$yearSU;
}
echo '
' . $notice . '
<form name="frmEventNewsletter" id="frmEventNewsletter" method="post" action="' . CalRoot . '/news-signup.php" onsubmit="return validate();">
<input name="uID" id="uID" type="hidden" value="' . $uID . '" />
<input name="gID" id="gID" type="hidden" value="' . $g . '" />';
if ($hc_cfg[65] > 0 && in_array(4, $hc_captchas)) {
echo '
<fieldset>
<legend>' . $hc_lang_core['CapLegend'] . '</legend>';
buildCaptcha();
echo '
</fieldset>';
}
echo '
<fieldset>
<legend>' . $hc_lang_news['Subscriber'] . '</legend>
<label for="hc_f1">' . $hc_lang_news['FName'] . '</label>
<input name="hc_f1" id="hc_f1" type="text" size="20" maxlength="50" placeholder="' . $hc_lang_news['PlaceFName'] . '" value="' . $firstname . '" required="required" />
<label for="hc_f2">' . $hc_lang_news['LName'] . '</label>
<input name="hc_f2" id="hc_f2" type="text" size="30" maxlength="50" placeholder="' . $hc_lang_news['PlaceLName'] . '" value="' . $lastname . '" required="required" />
<label for="hc_f3">' . $hc_lang_news['Email'] . '</label>' . ($email == '' ? '<input name="hc_f3" id="hc_f3" type="email" size="45" maxlength="75" placeholder="' . $hc_lang_news['PlaceEmail'] . '" value="' . $email . '" required="required" />' : '
<span class="output">' . $email . '</span>
<input type="hidden" name="hc_f3" id="hc_f3" value="' . $email . '" />') . '
<label for="hc_fa">' . $hc_lang_news['Birth'] . '</label>
<select name="hc_fa" id="hc_fa">
<option value="0">' . $hc_lang_news['Birth0'] . '</option>
' . $yrOpts . '
</select>
<label for="occupation">' . $hc_lang_news['Occupation'] . '</label>
';
include HCLANG . '/' . $hc_lang_config['OccupationFile'];
echo '
<label for="hc_fb">' . $hc_lang_news['Gender'] . '</label>
<select name="hc_fb" id="hc_fb">
<option value="0">' . $hc_lang_news['Gender0'] . '</option>
<option' . ($gender == 1 ? ' selected="selected"' : '') . ' value="1">' . $hc_lang_news['GenderF'] . '</option>
<option' . ($gender == 2 ? ' selected="selected"' : '') . ' value="2">' . $hc_lang_news['GenderM'] . '</option>
</select>
<label for="hc_fc">' . $hc_lang_news['Referral'] . '</label>
<select name="hc_fc" id="hc_fc">
<option value="0">' . $hc_lang_news['Referral0'] . '</option>
//.........这里部分代码省略.........
开发者ID:pvidali,项目名称:BCSR-1,代码行数:101,代码来源:simonsrock.php
示例12: user_manage_account
/**
* Output user account settings form.
* @since 2.1.0
* @version 2.1.0
* @return void
*/
function user_manage_account()
{
global $hc_cfg, $hc_lang_user;
if (!user_check_status()) {
return -1;
}
$uID = cIn($_SESSION['UserPkID']);
$result = doQuery("SELECT NetworkType, NetworkName, NetworkID, Email, FirstSignIn, Level, Location, Birthdate, APIKey, APIAccess\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "users WHERE PkID = '" . $uID . "'");
if (!hasRows($result) or !user_check_status()) {
return -1;
}
if (isset($_GET['msg'])) {
switch ($_GET['msg']) {
case "1":
feedback(1, $hc_lang_user['Feed01']);
break;
}
}
$network = cOut(mysql_result($result, 0, 0));
$network_name = cOut(mysql_result($result, 0, 1));
$network_id = cOut(mysql_result($result, 0, 2));
$email = isset($_SESSION['new_user_email']) && $_SESSION['new_user_email'] != '' ? cIn(strip_tags($_SESSION['new_user_email'])) : cOut(mysql_result($result, 0, 3));
$signin_first = cOut(mysql_result($result, 0, 4));
$level = cOut(mysql_result($result, 0, 5));
$location = cOut(mysql_result($result, 0, 6));
$api_key = cOut(mysql_result($result, 0, 8));
$api_access = cOut(mysql_result($result, 0, 9));
$birthdate = isset($_SESSION['new_user_birthdate']) && $_SESSION['new_user_birthdate'] != '' ? cIn(strip_tags($_SESSION['new_user_birthdate'])) : stampToDate(mysql_result($result, 0, 7), $hc_cfg[24]);
echo '
<form name="user_edit" id="user_edit" method="post" action="' . CalRoot . '/user-edit.php" onsubmit="return validate();">
<fieldset class="user">
<legend>' . $hc_lang_user['UserEditLabel'] . '</legend>
<label>' . $hc_lang_user['Network'] . '</label>
<span class="output">' . $hc_lang_user['Network' . $network] . '</span>
<label>' . $hc_lang_user['Level'] . '</label>
<span class="output">' . $hc_lang_user['Level' . $level] . '</span>
<label>' . $hc_lang_user['Name'] . '</label>
<span class="output">' . $network_name . '</span>
<label for="email"><b>' . $hc_lang_user['Email'] . '</b></label>
<input name="email" id="email" type="email" maxlength="75" size="35" value="' . $email . '" required="required" />
<label for="birthdate"><b>' . $hc_lang_user['Birthdate'] . '</b></label>
<input name="birthdate" id="birthdate" type="text" size="12" maxlength="10" value="' . $birthdate . '" required="required" />
<a href="javascript:;" onclick="calx.select(document.getElementById(\'birthdate\'),\'cal1\',\'' . $hc_cfg[51] . '\');return false;" id="cal1" class="ds calendar" tabindex="-1"></a>
<label for="user_loc">' . $hc_lang_user['Location'] . '</label>
<input name="user_loc" id="user_loc" type="text" maxlength="250" size="50" value="' . $location . '" />
</fieldset>';
if ($hc_cfg[127] == 1) {
echo '
<fieldset>
<legend>' . $hc_lang_user['API'] . '</legend>';
echo $api_access == 1 && $email != '' && $birthdate != '' ? '
<label> </label>
<span class="output">' . $hc_lang_user['APIHelp'] . '</span>
<label>' . $hc_lang_user['APIEndpoint'] . '</label>
<input size="50" maxlength="200" type="text" readonly="readonly" value="' . CalRoot . '/api/" onfocus="this.select();" />
<label>' . $hc_lang_user['Username'] . '</label>
<input size="20" maxlength="200" type="text" readonly="readonly" value="' . $network_name . '" onfocus="this.select();" />
<label>' . $hc_lang_user['Key'] . '</label>
<input size="45" maxlength="100" type="text" readonly="readonly" value="' . $api_key . '" onfocus="this.select();" />
<label> </label>
<span class="frm_ctrls">
<label for="regen_apik"><input name="regen_apik" id="regen_apik" type="checkbox" onclick="" />' . $hc_lang_user['RegenKey'] . '</label>
</span>' : '
<label> </label>
<span class="output">' . $hc_lang_user['APIUnavailable'] . ($api_access == 1 ? ' ' . $hc_lang_user['ActivateAPI'] : '') . '</span>';
echo '
</fieldset>';
}
echo '
<input type="submit" name="submit" id="submit" value="' . $hc_lang_user['Save'] . '" />
<input type="reset" name="reset" id="reset" value="' . $hc_lang_user['Reset'] . '" />
<input type="hidden" name="uID" id="uID" value="' . $uID . '" />
</form>
<div id="dsCal" class="datePicker"></div>
<script src="' . CalRoot . '/inc/javascript/validation.js"></script>
<script src="' . CalRoot . '/inc/lang/' . $_SESSION['LangSet'] . '/popCal.js"></script>
<script src="' . CalRoot . '/inc/javascript/DateSelect.js"></script>
<script>
//<!--
var calx = new CalendarPopup("dsCal");
calx.showYearNavigation();
calx.showYearNavigationInput();
calx.setCssPrefix("hc_");
calx.offsetX = 30;
calx.offsetY = -5;
function validate(){
var err = "";
err += reqField(document.getElementById("email"),"' . $hc_lang_user['Valid14'] . '\\n");
if(document.getElementById("email").value != "")
err +=validEmail(document.getElementById("email"),"' . $hc_lang_user['Valid10'] . '\\n");
//.........这里部分代码省略.........
开发者ID:pvidali,项目名称:BCSR-1,代码行数:101,代码来源:users.php
示例13: header
header('Location:' . ADMIN_PATH . 'admin_login.php');
} else {
if (!isset($access) || $access == "") {
$access = "admin";
}
//empty becomes admin
$access = strtolower($access);
//in case of typo
switch ($access) {
case "admin":
break;
case "superadmin":
# not developer/superadmin, back to admin page
if ($_SESSION['Privilege'] != "developer" && $_SESSION['Privilege'] != "superadmin") {
feedback("Your admin privileges do not allow access to the previous page.");
header('Location:' . ADMIN_PATH . 'admin_dashboard.php');
die;
}
break;
case "developer":
//highest level. all access!
# not developer to admin page
if ($_SESSION['Privilege'] != "developer") {
feedback("Your admin privileges do not allow access to the previous page.");
header('Location:' . ADMIN_PATH . 'admin_dashboard.php');
die;
}
break;
break;
}
}
开发者ID:newmanix,项目名称:itc240-fl15-retro-monday,代码行数:31,代码来源:admin_only_inc.php
示例14: go_home
\t\t\t<input type="submit" class="btn btn-primary" value="Confirm & Send →" name="post" />
\t\t\t</form>
\t\t</div>
\t\t<br>
\t</div>
</div>
feedback;
echo "<div class='span3'>";
go_home();
sidepanel();
echo "</div></div>";
display_footer();
echo "\n</body>\n</html>";
}
}
feedback("Attendance Portal - Feedback");
if (isset($_POST['post'])) {
include 'config/db.php';
include 'config/settings.php';
$dbname = $branchyear . '_Logs';
$table = $branchyear . '_Feedback';
$ftype = $_POST['ftype'];
$Sentby = $_SESSION['UserId'];
$sub = trim(htmlentities(addslashes($_POST['sub'])));
//$feedback = trim(htmlentities(addslashes($_POST['fb'])));
//$feedback = trim(htmlentities(addslashes(str_replace("\n","<br>",$_POST['fb']))));
$feedback = trim(str_replace("\n", "<br>", $_POST['fb']));
if (strlen($sub) < 6) {
echo "<script>show_error('Subject Length Must Be Lessthan or equals to 6');</script>";
exit;
}
开发者ID:0xc0d3r,项目名称:Attendance-Portal,代码行数:31,代码来源:feedback.php
示例15: insertExecute
function insertExecute()
{
$iConn = IDB::conn();
//must have DB as variable to pass to mysqli_real_escape() via iformReq()
$redirect = THIS_PAGE;
//global var used for following formReq redirection on failure
$FirstName = strip_tags(iformReq('FirstName', $iConn));
$LastName = strip_tags(iformReq('LastName', $iConn));
$Email = strip_tags(iformReq('Email', $iConn));
//next check for specific issues with data
if (!ctype_graph($_POST['FirstName']) || !ctype_graph($_POST['LastName'])) {
//data must be alphanumeric or punctuation only
feedback("First and Last Name must contain letters, numbers or punctuation");
myRedirect(THIS_PAGE);
}
if (!onlyEmail($_POST['Email'])) {
//data must be alphanumeric or punctuation only
feedback("Data entered for email is not valid");
myRedirect(THIS_PAGE);
}
//build string for SQL insert with replacement vars, %s for string, %d for digits
$sql = "INSERT INTO test_Customers (FirstName, LastName, Email) VALUES ('%s','%s','%s')";
# sprintf() allows us to filter (parameterize) form data
$sql = sprintf($sql, $FirstName, $LastName, $Email);
@mysqli_query($iConn, $sql) or die(trigger_error(mysqli_error($iConn), E_USER_ERROR));
#feedback success or failure of update
if (mysqli_affected_rows($iConn) > 0) {
//success! provide feedback, chance to change another!
feedback("Customer Added Successfully!", "notice");
} else {
//Problem! Provide feedback!
feedback("Customer NOT added!");
}
myRedirect(THIS_PAGE);
}
开发者ID:bschwartz757,项目名称:PHP-MySQL,代码行数:35,代码来源:L4-1.php
示例16: feedback
<label>
<input checked="checked" data-val="true" data-val-required="The AlertOptIn field is required." id="AlertOptIn" name="AlertOptIn" type="checkbox" value="true"><input name="AlertOptIn" type="hidden" value="false">
Я хочу получать на почту похожие объявления
</label>
</div>
</div> -->
<div class="clearfix"></div>
<div class="text-center">
<button class="df_btn_spinner btn btn-lg btn-primary" id="submit-request-button" title="Отправить"> <span class="df_spinnerText">
Отправить
</span>
<i class="fa fa-lg fa-spinner fa-pulse df_spinner"></i></button>
<div class="clearfix"></div>
<!-- <p>Отправляя это сообщение, вы принимаете условия <a href="/polzovatelskoe-soglashenie" class = "sertext" target="_blank">Пользовательского соглашения</a></p> -->
<?php
feedback();
?>
</div>
</form>
</div>
</div>
</div>
<?php
get_related_posts_thumbnails();
?>
<?php
comments_template();
开发者ID:pallid,项目名称:vershina,代码行数:31,代码来源:single-listings.php
示例17: header
<?php
/**
* @package Helios Calendar
* @license GNU General Public License version 2 or later; see LICENSE
*/
if (!defined('hcAdmin')) {
header("HTTP/1.1 403 No Direct Access");
exit;
}
include HCLANG . '/admin/pages.php';
if (isset($_GET['msg'])) {
switch ($_GET['msg']) {
case "1":
feedback(1, $hc_lang_pages['Feed01']);
break;
}
}
appInstructions(0, "Digest", $hc_lang_pages['TitleDigest'], $hc_lang_pages['InstructDigest']);
$aID = isset($_GET['aID']) && is_numeric($_GET['aID']) ? cIn($_GET['aID']) : 0;
$result = doQuery("SELECT * FROM " . HC_TblPrefix . "settings WHERE PkID IN (97,98,99)");
$status = 0;
$newFor = 1;
$welcomeMsg = '';
if (hasRows($result)) {
$status = cOut(mysql_result($result, 0, 1));
$welcomeMsg = cOut(mysql_result($result, 1, 1));
$newFor = cOut(mysql_result($result, 2, 1));
}
echo '
<form name="frmDigest" id="frmDigest" method="post" action="' . AdminRoot . '/components/DigestAction.php" onsubmit="return validate();">';
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:Digest.php
示例18: handle_POST
/**
* handles POST data and formulates email response.
*
* @param string $skipFields comma separated string of POST elements to be skipped
* @param boolean $sendEmail indicates whether developer wants email sent or not
* @param string $fromAddress fallback 'noreply' address for domain hosting page
* @param string $toAddress address to receive email
* @param string $website name of website where form was filled out
* @param string $fromDomain name of website where form was filled out
* @return none
* @uses show_POST()
* @todo none
*/
function handle_POST($skipFields, $sendEmail, $toName, $fromAddress, $toAddress, $website, $fromDomain)
{
$aSkip = explode(",", $skipFields);
#split form elements to skip into array
$postData = show_POST($aSkip);
#loops through and creates select POST data for display/email
$fromAddress = "";
//default
if (is_email($_POST['Email'])) {
#Only use Email for return address if valid
$fromAddress = $_POST['Email'];
# extra email injector paranoia courtesy of DH: http://wiki.dreamhost.com/PHP_mail()#Mail_Header_Injection
$fromAddress = preg_replace("([\r\n])", "", $fromAddress);
}
if ($sendEmail) {
#create email
if (isset($_POST['Name'])) {
$Name = $_POST['Name'];
} else {
$Name = "";
}
#Name, if used part of subject
foreach ($_POST as $value) {
#Content-Type: is too similar to email injection to allow
$spaceless = str_replace(" ", "", $value);
#in case hacker is clever enough to remove spaces
if (stripos($spaceless, 'Content-Type:') !== FALSE) {
feedback("Incorrect form data. Email NOT sent. (error code #" . createErrorCode(THIS_PAGE, __LINE__) . ")", "error");
myRedirect(THIS_PAGE);
}
}
$Name = safe($Name);
#Name is part of Subject/header - filter code further for email injection
if ($Name != "") {
$SubjectName = " from: " . $Name . ",";
} else {
$SubjectName = "";
}
#Name, if used part of subject
$postData = str_replace("<br />", PHP_EOL . PHP_EOL, $postData);
#replace <br /> tags with double c/r
$Subject = $website . " message" . $SubjectName . " " . date('F j, Y g:i a');
$txt = $Subject . PHP_EOL . PHP_EOL . $postData;
email_handler($
|
请发表评论