当前位置: 首页>>代码示例>>PHP>>正文


PHP cIn函数代码示例

本文整理汇总了PHP中cIn函数的典型用法代码示例。如果您正苦于以下问题:PHP cIn函数的具体用法?PHP cIn怎么用?PHP cIn使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cIn函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: location_events

/**
 * Output list of upcoming events for the location.
 * @since 2.0.0
 * @version 2.0.0
 * @param integer $limit [optional] Event List Size (Default:5)
 * @return void
 */
function location_events($limit = 5)
{
    global $lID, $hc_cfg, $hc_lang_core, $hc_lang_locations;
    $result = doQuery("SELECT PkID, Title, StartDate, StartTime, EndTime, TBD\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "events \r\n\t\t\t\t\t\t\tWHERE IsActive = 1 AND IsApproved = 1 AND LocID = '" . cIn($lID) . "' AND StartDate >= '" . cIn(SYSDATE) . "'\r\n\t\t\t\t\t\tORDER BY StartDate, TBD, StartTime, Title\r\n\t\t\t\t\t\tLIMIT " . cIn($limit));
    if (!hasRows($result)) {
        echo '<p>' . $hc_lang_locations['NoEvents'] . ' <a href="' . CalRoot . '/index.php?com=submit" rel="nofollow">' . $hc_lang_locations['NoEventsLink'] . '</a></p>';
        return 0;
    }
    $cnt = $date = 0;
    while ($row = mysql_fetch_row($result)) {
        if ($date != $row[2]) {
            $date = $row[2];
            echo $cnt > 0 ? '
			</ul>' : '';
            echo '
			<header>' . stampToDate($row[2], $hc_cfg[14]) . '</header>
			<ul>';
            $cnt = 1;
        }
        $hl = $cnt % 2 == 0 ? ' class="hl"' : '';
        if ($row[5] == 0) {
            $time = $row[3] != '' ? stampToDate($row[3], $hc_cfg[23]) : '';
            $time .= $row[4] != '' ? ' - ' . stampToDate($row[4], $hc_cfg[23]) : '';
            $stamp = date("Y-m-d\\Th:i:00", strtotime($row[2] . trim(' ' . $row[3]))) . HCTZ;
        } else {
            $time = $row[5] == 1 ? $hc_lang_locations['AllDay'] : $hc_lang_locations['TBA'];
            $stamp = date("Y-m-d", strtotime($row[2]));
        }
        echo '
			<li' . $hl . ' itemscope itemtype="http://schema.org/Event"><time itemprop="startDate" datetime="' . $stamp . '">' . $time . '</time><a itemprop="url" href="' . CalRoot . '/index.php?eID=' . $row[0] . '"><span itemprop="name">' . cOut($row[1]) . '</span></a></li>';
        ++$cnt;
    }
    echo '</ul>';
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:41,代码来源:locations.php

示例2: cleanEmailLink

/**
 * Output obfuscated mailto: link.
 * @since 2.0.0
 * @version 2.0.0
 * @param string $email email address for link
 * @param string $subject [optional] subject of email
 * @param string $label [optional] text to precede link
 * @return datatype description
 */
function cleanEmailLink($email, $subject = '', $label = '')
{
    $var1 = preg_replace('/[0-9]*/', '', md5(rand(0, 10845)));
    $var2 = preg_replace('/[0-9]*/', '', md5(rand(10846, 20795)));
    $var3 = preg_replace('/[0-9]*/', '', md5(rand(20796, 31794)));
    $var4 = preg_replace('/[0-9]*/', '', md5(rand(31794, 42847)));
    $eParts = explode("@", $email);
    if (!isset($eParts[1])) {
        echo $label;
        return;
    }
    $eEnds = explode(".", $eParts[1]);
    $eEnds = implode('" + "&#46;" + "', $eEnds);
    $subject = $subject != '' ? " + '?subject=" . cIn($subject) : " + '";
    echo '
		<script>
		//<!--
			var ' . $var2 . ' = "' . $eEnds . '";var ' . $var1 . ' = "' . $eParts[0] . '";var ' . $var3 . ' = ' . $var1 . ';var ' . $var4 . ' = ' . $var2 . ';
			document.write(\'' . $label . '<a href="\' + \'ma\' + \'ilt\' + \'o:\' + ' . $var3 . ' + \'&#64;\' + ' . $var4 . ' + \'">\' + ' . $var3 . ' + \'&#64;\' + ' . $var4 . ' + \'</a>\');
		//-->
		</script>';
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:misc.php

示例3: startNewSession

function startNewSession()
{
    global $hc_cfg;
    $aUser = isset($_SESSION['AdminPkID']) ? cIn($_SESSION['AdminPkID']) : 0;
    $resultAS = doQuery("SELECT Access FROM " . HC_TblPrefix . "admin WHERE PkID = '" . $aUser . "'");
    $knownSession = hasRows($resultAS) ? mysql_result($resultAS, 0, 0) : NULL;
    if ($knownSession != md5(session_id())) {
        killAdminSession();
    } else {
        $_SESSION['hc_SessionReset'] = date("U") + mt_rand(60, 900);
    }
    $old_session = session_id();
    session_regenerate_id();
    $new_session = session_id();
    session_write_close();
    session_id($new_session);
    session_name($hc_cfg[200]);
    session_start();
    $_SESSION['hc_whoami'] = md5($_SERVER['REMOTE_ADDR'] . session_id());
    if (isset($_COOKIE[$old_session])) {
        setcookie($old_session, '', time() - 86400, '/');
    }
    doQuery("UPDATE " . HC_TblPrefix . "admin SET Access = '" . cIn(md5(session_id())) . "' WHERE PkID = '" . $aUser . "'");
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:24,代码来源:admin.php

示例4: define

<?php

/**
 * @package Helios Calendar
 * @license GNU General Public License version 2 or later; see LICENSE
 */
define('isHC', true);
define('isAction', true);
include dirname(__FILE__) . '/loader.php';
action_headers();
$new_lang = isset($_GET['l']) ? strtolower(cIn(strip_tags($_GET['l']))) : '';
$target = CalRoot . '/';
if ($new_lang != '') {
    $dir = dir(realpath(HCPATH . HCINC . '/lang/'));
    if (is_dir($dir->path . '/' . $new_lang)) {
        $_SESSION['LangSet'] = $new_lang;
        if (isset($_SERVER['HTTP_REFERER']) && preg_match('(^' . CalRoot . ')', $_SERVER['HTTP_REFERER'])) {
            $target = cIn(strip_tags($_SERVER['HTTP_REFERER']));
        }
    }
}
header('Location: ' . $target);
开发者ID:pvidali,项目名称:BCSR-1,代码行数:22,代码来源:lang.php

示例5: define

 */
define('hcAdmin', true);
include '../loader.php';
admin_logged_in();
action_headers();
include HCLANG . '/admin/newsletter.php';
$eID = isset($_SESSION['ReportDownload']) ? implode(',', array_filter(explode(',', utf8_decode($_SESSION['ReportDownload'])), 'is_numeric')) : '0';
header('Content-type: application/csv');
header('Content-Disposition: inline; filename="' . CalName . ' Event Report ' . SYSDATE . '.csv"');
$resultX = doQuery("SELECT MAX(Views), MAX(Directions), MAX(Downloads), MAX(EmailToFriend), MAX(URLClicks),\r\n\t\t\t\t\t\tAVG(Views), AVG(Directions), AVG(Downloads), AVG(EmailToFriend), AVG(URLClicks)\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "events\r\n\t\t\t\t\tWHERE IsActive = 1 AND IsApproved = 1");
if (hasRows($resultX)) {
    $mViews = cOut(mysql_result($resultX, 0, 0));
    $mDir = cOut(mysql_result($resultX, 0, 1));
    $mDwnl = cOut(mysql_result($resultX, 0, 2));
    $mEmail = cOut(mysql_result($resultX, 0, 3));
    $mURL = cOut(mysql_result($resultX, 0, 4));
    $aViews = cOut(round(mysql_result($resultX, 0, 5), 0));
    $aDir = cOut(round(mysql_result($resultX, 0, 6), 0));
    $aDwnl = cOut(round(mysql_result($resultX, 0, 7), 0));
    $aEmail = cOut(round(mysql_result($resultX, 0, 8), 0));
    $aURL = cOut(round(mysql_result($resultX, 0, 9), 0));
}
echo "Event,Views,Directions,Downloads,Email,URL\n";
echo "Average," . number_format($aViews, 0, '.', ',') . "," . number_format($aDir, 0, '.', ',') . "," . number_format($aDwnl, 0, '.', ',') . "," . number_format($aEmail, 0, '.', ',') . "," . number_format($aURL, 0, '.', ',') . "\n";
echo "Best," . number_format($mViews, 0, '.', ',') . "," . number_format($mDir, 0, '.', ',') . "," . number_format($mDwnl, 0, '.', ',') . "," . number_format($mEmail, 0, '.', ',') . "," . number_format($mURL, 0, '.', ',') . "\n";
$result = doQuery("SELECT e.PkID, e.Title, e.Views, e.Directions, e.Downloads, e.EmailToFriend, e.URLClicks\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "events e\r\n\t\t\t\t\tWHERE e.PkID IN(" . cIn($eID) . ") ORDER BY e.PkID");
if (hasRows($result)) {
    while ($row = mysql_fetch_row($result)) {
        echo "(" . $row[0] . ") " . str_replace(',', '', $row[1]) . "," . $row[2] . "," . $row[3] . "," . $row[4] . "," . $row[5] . "," . $row[6] . "\n";
    }
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:ReportActivityD.php

示例6: fwrite

            if (!$fp) {
                $apiFail = true;
                $errorMsg = 'Connection to bitly Failed.';
            } else {
                $data = '';
                $request = "GET " . $bSend . " HTTP/1.1\r\nHost: " . $host . "\r\nConnection: Close\r\n\r\n";
                fwrite($fp, $request);
                while (!feof($fp)) {
                    $data .= fread($fp, 1024);
                }
                fclose($fp);
                $status_code = xml_tag_value('status_code', $data);
                if ($status_code != '200') {
                    $apiFail = true;
                    $errorMsg = 'Error Msg From bitly - <i>' . xml_tag_value('status_txt', $data) . '</i>';
                } else {
                    $bitURL = xml_tag_value('url', $data);
                }
                if ($bitURL != '') {
                    if (isset($eID)) {
                        doQuery("UPDATE " . HC_TblPrefix . "events SET ShortURL = '" . cIn($bitURL) . "' WHERE PkID = '" . cIn($eID) . "'");
                    } elseif (isset($lID)) {
                        doQuery("UPDATE " . HC_TblPrefix . "locations SET ShortURL = '" . cIn($bitURL) . "' WHERE PkID = '" . cIn($lID) . "'");
                    }
                    $shortLink = $bitURL;
                }
            }
        }
    }
}
echo $errorMsg != '' ? $errorMsg : '';
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:ShortenURL.php

示例7: define

 * @license GNU General Public License version 2 or later; see LICENSE
 */
define('isHC', true);
define('isAction', true);
include_once '../loader.php';
header('Content-type: application/xml; charset="utf-8"');
//	if(!file_exists(HCPATH.'/cache/sitemap_index')){
if (1 == 1) {
    ob_start();
    $fp = fopen(HCPATH . '/cache/sitemap_index', 'w');
    echo '<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>' . CalRoot . '/sitemap/site.php</loc>
  </sitemap>';
    $result = doQuery("SELECT COUNT(PkID), MAX(PublishDate) FROM " . HC_TblPrefix . "events WHERE StartDate >= '" . cIn(SYSDATE) . "' AND IsActive = 1 AND IsApproved = 1");
    if (hasRows($result)) {
        $last = mysql_result($result, 0, 1) != '' ? '<lastmod>' . stampToDate(mysql_result($result, 0, 1), '%Y-%m-%d') . '</lastmod>' : '';
        $x = 1;
        $stop = mysql_result($result, 0, 0) > $hc_cfg[87] ? ceil(mysql_result($result, 0, 0) / $hc_cfg[87]) : 1;
        while ($x <= $stop) {
            echo '
  <sitemap>
    <loc>' . CalRoot . '/sitemap/events.php?map=' . $x . '</loc>
    ' . $last . '
  </sitemap>';
            ++$x;
        }
    }
    $result = doQuery("SELECT COUNT(l.PkID), MAX(l.LastMod) FROM " . HC_TblPrefix . "locations l WHERE l.IsActive = 1");
    if (hasRows($result)) {
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:index.php

示例8: header

 * @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/manage.php';
if (isset($_GET['msg'])) {
    switch ($_GET['msg']) {
        case "1":
            feedback(1, $hc_lang_manage['Feed01']);
            break;
    }
}
appInstructions(0, "Billboard_Events", $hc_lang_manage['TitleBillboard'], $hc_lang_manage['InstructBillboard']);
$result = doQuery("SELECT PkID, Title, StartDate, Views FROM " . HC_TblPrefix . "events WHERE IsActive = 1 AND IsApproved = 1 AND IsBillboard = 1 AND StartDate >= '" . cIn(SYSDATE) . "' ORDER BY StartDate, Views DESC");
if (hasRows($result)) {
    echo '
		<ul class="data">
			<li class="row header uline">
				<div style="width:68%;">' . $hc_lang_manage['Title'] . '</div>
				<div style="width:10%;">' . $hc_lang_manage['Date'] . '</div>
				<div class="number" style="width:10%;">' . $hc_lang_manage['Views'] . '</div>
				<div style="width:10%;">&nbsp;</div>
			</li>
		</ul>
		<ul class="data">
		<div class="blbd">';
    $cnt = 0;
    while ($row = mysql_fetch_row($result)) {
        $hl = $cnt % 2 == 1 ? ' hl' : '';
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:EventBillboard.php

示例9: define

<?php

/**
 * @package Helios Calendar
 * @license GNU General Public License version 2 or later; see LICENSE
 */
define('hcAdmin', true);
include '../loader.php';
admin_logged_in();
action_headers();
$token = isset($_GET['tkn']) ? cIn(strip_tags($_GET['tkn'])) : '';
if (!check_form_token($token)) {
    go_home();
}
include HCLANG . '/admin/settings.php';
$e = preg_match('/^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/', $_GET['e']) == 1 ? cIn(strip_tags($_GET['e'])) : '';
echo '
<link rel="stylesheet" type="text/css" href="' . AdminRoot . '/css/admin.css">
<style>
html, body {background:#FFFFFF;padding:5px;}
</style>';
if ($e != '') {
    if (!$hc_cfg[71] == 1) {
        echo '
		<p>' . $hc_lang_settings['EmailTestMail'] . '</p>';
    }
    reMail('', $e, CalName . ' ' . $hc_lang_settings['TestSubj'], $hc_lang_settings['TestMsg'], $hc_cfg[79], $hc_cfg[78], NULL, true);
} else {
    echo '
		' . $hc_lang_settings['EmailTestError'] . '
<script>
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:EmailTest.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/newsletter.php';
if (isset($_GET['gID']) && is_numeric($_GET['gID'])) {
    $gID = isset($_GET['gID']) && is_numeric($_GET['gID']) ? cIn(strip_tags($_GET['gID'])) : 0;
    $isPublic = 0;
    $name = $descript = '';
    $helpText = $hc_lang_news['InstructAddG'];
    $result = doQuery("SELECT * FROM " . HC_TblPrefix . "mailgroups WHERE PkID = '" . $gID . "' AND IsActive = 1");
    if (hasRows($result)) {
        $name = cOut(mysql_result($result, 0, 1));
        $descript = cOut(mysql_result($result, 0, 2));
        $isPublic = cOut(mysql_result($result, 0, 3));
        $helpText = $hc_lang_news['InstructEditG'];
    }
    appInstructions(0, 'Subscriber_Groups', $hc_lang_news['TitleGroup'], $helpText);
    echo '
	<form name="frm" id="frm" method="post" action="' . AdminRoot . '/components/MailGroupsAction.php" onsubmit="return validate();">';
    set_form_token();
    echo '
	<input type="hidden" name="gID" id="nID" value="' . $gID . '" />
	' . ($gID == 1 ? '
	<input type="hidden" name="description" id="description" value="" />
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:MailGroups.php

示例11: isset

    $curSubmit = isset($_SESSION['hc_curSubmit']) ? $_SESSION['hc_curSubmit'] : 0;
    if ($hc_cfg[40] > 0 && count($dates) + $curSubmit >= $hc_cfg[40]) {
        exit($hc_lang_submit['NoSubmit']);
    } else {
        $_SESSION['hc_curSubmit'] = $curSubmit + count($dates);
    }
    foreach ($dates as $val) {
        $eventDate = $val;
        $query = "INSERT INTO " . HC_TblPrefix . "events(Title, LocationName, LocationAddress, LocationAddress2,\r\n\t\t\t\t\t\tLocationCity, LocationState, LocationZip, Description,\r\n\t\t\t\t\t\tStartDate, StartTime, TBD, EndTime, ContactName,\r\n\t\t\t\t\t\tContactEmail, ContactPhone, ContactURL, IsActive, IsApproved,\r\n\t\t\t\t\t\tIsBillboard, SubmittedByName, SubmittedByEmail, SubmittedAt, SeriesID,\r\n\t\t\t\t\t\tMessage, LocID, Cost, LocCountry, OwnerID, PublishDate, LastMod)\r\n\t\t\t\t\tVALUES(\t'" . cIn($eventTitle) . "', '" . cIn($locName) . "', '" . cIn($locAddress) . "', '" . cIn($locAddress2) . "',\r\n\t\t\t\t\t\t\t'" . cIn($locCity) . "', '" . cIn($locState) . "', '" . cIn($locZip) . "', '" . cIn($eventDesc, 0) . "',\r\n\t\t\t\t\t\t\t'" . cIn($eventDate) . "', " . $startTime . ", '" . cIn($tbd) . "', " . $endTime . ",\r\n\t\t\t\t\t\t\t'" . cIn($contactName) . "', '" . cIn($contactEmail) . "', '" . cIn($contactPhone) . "', '" . cIn($contactURL) . "',\r\n\t\t\t\t\t\t\t'1', '" . $appStatus . "', '0', '" . cIn($subName) . "', '" . cIn($subEmail) . "', '" . SYSDATE . " " . SYSTIME . "' , " . $seriesID . ",\r\n\t\t\t\t\t\t\t'" . $adminMessage . "','" . cIn($locID) . "', '" . cIn($cost) . "', '" . cIn($locCountry) . "', '" . cIn($subID) . "',\r\n\t\t\t\t\t\t\t" . $pubDate . ", " . $pubDate . ");";
        doQuery($query);
        $result = doQuery("SELECT LAST_INSERT_ID() FROM " . HC_TblPrefix . "events");
        $newPkID = mysql_result($result, 0, 0);
        if (isset($_POST['catID']) && is_array($_POST['catID'])) {
            foreach ($_POST['catID'] as $val) {
                if (is_numeric($val) && $val > 0) {
                    doQuery("INSERT INTO " . HC_TblPrefix . "eventcategories(EventID, CategoryID) VALUES('" . cIn($newPkID) . "', '" . cIn($val) . "')");
                }
            }
        }
        if ($rsvp_type == 1 && $newPkID > 0) {
            doQuery("INSERT INTO " . HC_TblPrefix . "eventrsvps(Type,EventID,OpenDate,CloseDate,Space,RegOption,Notices)\r\n\t\t\t\t\t\tVALUES('" . $rsvp_type . "','" . $newPkID . "','" . $rsvp_open . "','" . $rsvp_close . "','" . $rsvp_space . "','" . $rsvp_disp . "','" . $rsvp_notice . "')");
        }
    }
    if ($newPkID > 0 && $hc_cfg[78] != '' && $hc_cfg[79] != '') {
        $eventDates = strftime($hc_cfg[24], strtotime($dates[0])) . ($dates[0] != end($dates) ? ' - ' . strftime($hc_cfg[24], strtotime(end($dates))) : '');
        $occurs = count($dates);
        notice_public_event($subName, $subEmail, $adminMessage, $locID, $locName, $locAddress, $locAddress2, $locCity, $locState, $locCountry, $locZip, $eventTitle, $eventDesc, $eventDates, $occurs);
    }
    header("Location: " . CalRoot . "/index.php?com=submit&msg=1");
} else {
    exit($hc_lang_submit['ValidFail']);
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:event-submit.php

示例12: isset

			}
		}
		//-->
		</script>';
} else {
    $token = '';
    $token = $token == '' && isset($_POST['token']) ? cIn(strip_tags($_POST['token'])) : $token;
    $token = $token == '' && isset($_GET['tkn']) ? cIn(strip_tags($_GET['tkn'])) : $token;
    appInstructions(1, "Merging_Locations", $hc_lang_locations['TitleMerge'], $hc_lang_locations['InstructMerge2']);
    $locName = '';
    if (isset($_GET['l'])) {
        $locName = isset($_GET['l']) ? strip_tags(str_replace("'", "\"", $_GET['l'])) : '';
    } elseif (isset($_POST['locName'])) {
        $locName = isset($_POST['locName']) ? strip_tags(str_replace("'", "\"", $_POST['locName'])) : '';
    }
    $result = doQuery("SELECT PkID, Name, IsPublic, \r\n\t\t\t\t\t\t\t(SELECT COUNT(PkID) FROM " . HC_TblPrefix . "events e WHERE e.StartDate >= '" . SYSDATE . "' AND e.LocID = l.PkID) AS EventCnt\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "locations l\r\n\t\t\t\t\t\tWHERE IsActive = 1 AND\r\n\t\t\t\t\t\t\t(MATCH(Name,Address,Address2) AGAINST('" . cIn($locName, 0) . "' IN BOOLEAN MODE) OR NAME LIKE('%" . cIn($locName) . "%'))\r\n\t\t\t\t\t\tORDER BY IsPublic, Name");
    if (!hasRows($result) || $locName == '' || !check_form_token($token)) {
        echo '
			<p>' . $hc_lang_locations['NoLoc'] . '</p>
			<p><a href="' . AdminRoot . '/index.php?com=locsearch">' . $hc_lang_locations['NoLocLink'] . '</a></p>';
    } else {
        echo '
			<form name="frmMergeLocation" id="frmMergeLocation" method="post" action="' . AdminRoot . '/index.php?com=location&amp;m=1" onsubmit="return validate();">';
        set_form_token();
        echo '
			<div class="catCtrl">
				[ <a href="javascript:;" onclick="checkAllArray(\'frmMergeLocation\',\'locID[]\');">' . $hc_lang_core['SelectAll'] . '</a>
				&nbsp;|&nbsp; <a href="javascript:;" onclick="uncheckAllArray(\'frmMergeLocation\',\'locID[]\');">' . $hc_lang_core['DeselectAll'] . '</a> ]
			</div>
			<ul class="data">
				<li class="row header uline">
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:LocationSearch.php

示例13: ON

		</select>
		<label for="eventBillboard">' . $hc_lang_event['Billboard'] . '</label>
		<select name="eventBillboard" id="eventBillboard">
			<option' . ($eventBillboard == 0 ? ' selected="selected"' : '') . ' value="0">' . $hc_lang_event['Billboard0'] . '</option>
			<option' . ($eventBillboard == 1 ? ' selected="selected"' : '') . ' value="1">' . $hc_lang_event['Billboard1'] . '</option>
		</select>
		<label for="eventFeatured">' . $hc_lang_event['Featured'] . '</label>
		<select name="eventFeatured" id="eventFeatured">
			<option' . ($featured == 0 ? ' selected="selected"' : '') . ' value="0">' . $hc_lang_event['Featured0'] . '</option>
			<option' . ($featured == 1 ? ' selected="selected"' : '') . ' value="1">' . $hc_lang_event['Featured1'] . '</option>
		</select>
		<label for="eventHide">' . $hc_lang_event['Expire'] . '</label>
		<input name="eventHide" id="eventHide" type="number" min="1" max="999" size="4" maxlength="3" value="' . $expire . '" required="required" />
		<span class="output">' . $hc_lang_event['Days'] . '</span>
		<label>' . $hc_lang_event['Categories'] . '</label>';
$query = $eID > 0 ? "SELECT c.PkID, c.CategoryName, c.ParentID, c.CategoryName as Sort, ec.EventID as Selected\r\n\t\t\tFROM " . HC_TblPrefix . "categories c\r\n\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID AND ec.EventID = " . cIn($eID) . ")\r\n\t\t\tWHERE c.ParentID = 0 AND c.IsActive = 1\r\n\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID, ec.EventID\r\n\t\t\tUNION\r\n\t\t\tSELECT c.PkID, c.CategoryName, c.ParentID, c2.CategoryName as Sort, ec.EventID as Selected\r\n\t\t\tFROM " . HC_TblPrefix . "categories c\r\n\t\t\t\tLEFT JOIN " . HC_TblPrefix . "categories c2 ON (c.ParentID = c2.PkID)\r\n\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID AND ec.EventID = " . cIn($eID) . ")\r\n\t\t\tWHERE c.ParentID > 0 AND c.IsActive = 1\r\n\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID, c2.CategoryName, ec.EventID\r\n\t\t\tORDER BY Sort, ParentID, CategoryName" : NULL;
getCategories('frmEventAdd', 3, $query, 1);
echo '
	</fieldset>
	<fieldset>
		<legend>' . $hc_lang_event['Location'] . '</legend>';
echo $locID > 0 ? '
		<div id="locSetting" class="frm_ctrl">
			<label>' . $hc_lang_event['CurLocation'] . '</label>
			<span class="output">
				<b>' . $locName . '</b><br />
				' . buildAddress($locAddress, $locAddress2, $locCity, $state, $locPostal, $locCountry, $hc_lang_config['AddressType']) . '
			</span>
			<label>&nbsp;</label>
			<span class="output">
				<a href="javascript:;" onclick="setLocation(0,\'\',1);" class="locChange">' . $hc_lang_event['ChngLocation'] . '</a>
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:eventadd-archive.php

示例14: header

 * @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();">';
set_form_token();
echo '
	<fieldset>
		<legend>' . $hc_lang_pages['Settings'] . '</legend>
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:Digest.php

示例15: define

 * @license GNU General Public License version 2 or later; see LICENSE
 */
define('hcAdmin', true);
include '../loader.php';
admin_logged_in();
action_headers();
$token = '';
$token = $token == '' && isset($_POST['token']) ? cIn(strip_tags($_POST['token'])) : $token;
$token = $token == '' && isset($_GET['tkn']) ? cIn(strip_tags($_GET['tkn'])) : $token;
if (!check_form_token($token)) {
    go_home();
}
if (!isset($_GET['dID'])) {
    $gID = isset($_POST['gID']) && is_numeric($_POST['gID']) ? cIn($_POST['gID']) : 0;
    $name = isset($_POST['name']) ? cIn($_POST['name']) : '';
    $description = isset($_POST['description']) ? cIn(cleanQuotes($_POST['description']), 1) : '';
    $status = isset($_POST['status']) ? cIn($_POST['status']) : '';
    $result = doQuery("SELECT * FROM " . HC_TblPrefix . "mailgroups WHERE PkID = '" . $gID . "'");
    if (hasRows($result)) {
        doQuery("UPDATE " . HC_TblPrefix . "mailgroups\r\n\t\t\t\t\tSET Name = '" . $name . "',\r\n\t\t\t\t\t\tDescription = '" . $description . "',\r\n\t\t\t\t\t\tIsPublic = '" . $status . "'\r\n\t\t\t\t\tWHERE PkID = '" . $gID . "'");
        header("Location: " . AdminRoot . "/index.php?com=subgrps&msg=2");
    } else {
        doQuery("INSERT INTO " . HC_TblPrefix . "mailgroups(Name,Description,IsPublic,IsActive)\r\n\t\t\t\t\tValues(\t'" . $name . "',\r\n\t\t\t\t\t\t\t'" . $description . "',\r\n\t\t\t\t\t\t\t'" . $status . "',1)");
        header("Location: " . AdminRoot . "/index.php?com=subgrps&msg=3");
    }
} else {
    if ($_GET['dID'] != 1) {
        doQuery("UPDATE " . HC_TblPrefix . "mailgroups SET IsActive = 0 WHERE PkiD = '" . cIn(strip_tags($_GET['dID'])) . "'");
    }
    header("Location: " . AdminRoot . "/index.php?com=subgrps&msg=1");
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:MailGroupsAction.php


注:本文中的cIn函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。