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


PHP cOut函数代码示例

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


在下文中一共展示了cOut函数的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: ou_event_carousel

/**
 * Output weekly dashboard to a page outside of Helios Calendar.
 * @since 2.0.1
 * @version 2.0.1
 * @param binary $submit include submit event link, 0 = hide , 1 = show (Default:1)
 * @param binary $ical include iCalendar subscription link, 0 = hide, 1 = show (Default:1)
 * @param binary $rss include All Events rss feed link, 0 = hide, 1 = show (Default:1)
 * @param binary $end_time include end time in event lists, 0 = hide, 1 = show (Default:1)
 * @param string $menu_format menu format string, accepts any supported strftime() format parameters (Default:%a %m/%d)
 * @return void
 */
function ou_event_carousel($submit = 1, $ical = 1, $rss = 1, $end_time = 1, $menu_format = '%a %m/%d')
{
    global $hc_cfg, $hc_lang_core;
    include HCLANG . '/public/integration.php';
    echo "SYSDATE: " . SYSDATE . "\n";
    if (file_exists(HCPATH . '/cache/int14_' . SYSDATE . '.php')) {
        if (count(glob(HCPATH . '/cache/int14_*.php')) > 0) {
            foreach (glob(HCPATH . '/cache/int14_*.php') as $file) {
                unlink($file);
            }
        }
        ob_start();
        $fp = fopen(HCPATH . '/cache/int14_' . SYSDATE . '.php', 'w');
        fwrite($fp, "<?php\n//\tHelios Dashboard Integration Events Cache - Delete this file when upgrading.\n");
        //link, category, title, start date, end date, start time, end time, location, description
        //array("05/15/2015 - 05/15/2015","1","test event")
        $result = doQuery("SELECT PkID, Title, Description, StartDate, EndDate, StartTime,  EndTime, TBD, LocID, LocationName  FROM " . HC_TblPrefix . "events\nWHERE IsActive = 1 AND IsApproved = 1 AND StartDate Between '" . SYSDATE . "' AND ADDDATE('" . SYSDATE . "', INTERVAL 14 DAY)\nORDER BY StartDate, TBD, StartTime, Title, LocationName");
        if (hasRows($result)) {
            $cur_day = -1;
            $cur_date = '';
            fwrite($fp, "\$hc_next14 = array(\n");
            while ($row = mysql_fetch_row($result)) {
                print_r($row);
                $ouTitle = $row[1];
                $ouDesc = $row[2];
                $ouLoc = $row[7];
                //echo "\nouLoc: " . $ouLoc;
                if ($cur_date = $row[3]) {
                    ++$cur_day;
                    $cur_date = $row[3];
                    if ($cur_day > 0) {
                        fwrite($fp, "\t),\n");
                    }
                    fwrite($fp, $cur_day . " => array(\n");
                }
                if ($row[6] == 0) {
                    $time = $row[4] != '' ? stampToDate($row[4], $hc_cfg[24]) : '';
                    $time .= $row[5] != '' && $end_time == 1 ? ' - ' . stampToDate($row[5], $hc_cfg[24]) : '';
                } else {
                    $time = $row[6] == 1 ? $hc_lang_int['AllDay'] : $hc_lang_int['TimeTBA'];
                }
                fwrite($fp, "\t" . $row[0] . " => array(\"" . $time . "\",\"" . stampToDate($row[3], $hc_cfg[15]) . "\",\"" . str_replace("\"", "'", cOut($row[1])) . "\"),\n");
            }
            fwrite($fp, "\t),");
        }
        fwrite($fp, "\n)\n?>");
        fwrite($fp, ob_get_contents());
        fclose($fp);
        ob_end_clean();
    }
    include HCPATH . '/cache/int14_' . SYSDATE . '.php';
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:63,代码来源:ou.php

示例3: doQuery

            if (!preg_match("{$hc_cfg['85']}i", $_SERVER['HTTP_USER_AGENT'])) {
                doQuery("UPDATE " . HC_TblPrefix . "events SET Downloads = Downloads + 1 WHERE PkID = '" . $eID . "'");
            }
            $link = "http://calendar.live.com/calendar/calendar.aspx?rru=addevent";
            if (mysql_result($result, 0, 11) == 0) {
                if (mysql_result($result, 0, 12) != '') {
                    $link .= "&dtstart=" . stampToDate(mysql_result($result, 0, 9) . " " . mysql_result($result, 0, 10), "%Y%m%dT%H%M%S") . "&dtend=" . stampToDate(mysql_result($result, 0, 9) . " " . mysql_result($result, 0, 12), "%Y%m%dT%H%M%S");
                } else {
                    $link .= "&dtstart=" . stampToDate(mysql_result($result, 0, 9) . " " . mysql_result($result, 0, 10), "%Y%m%dT%H%M%S") . "&dtend=" . stampToDate(mysql_result($result, 0, 9) . " " . mysql_result($result, 0, 10), "%Y%m%dT%H%M%S");
                }
            } else {
                $link .= "&dtstart=" . stampToDate(mysql_result($result, 0, 9), "%Y%m%d") . "T000000&dtend=" . stampToDate(mysql_result($result, 0, 9), "%Y%m%d") . "T000000";
            }
            $link .= "&summary=" . urlencode(mysql_result($result, 0, 1));
            if (strlen(mysql_result($result, 0, 8)) > 400) {
                $link .= "&description=" . urlencode(htmlspecialchars(strip_tags(cOut(substr(mysql_result($result, 0, 8), 0, 400)))) . "...\n\nFull Description available at: " . CalRoot . "/index.php?eID=" . $eID);
            } else {
                $link .= "&description=" . urlencode(htmlspecialchars(strip_tags(cOut(mysql_result($result, 0, 8)))));
            }
            if (mysql_result($result, 0, 35) == 0 || mysql_result($result, 0, 35) == '') {
                $link .= "&location=" . urlencode(mysql_result($result, 0, 3) . " " . mysql_result($result, 0, 4) . " " . mysql_result($result, 0, 5) . " " . mysql_result($result, 0, 6) . " " . mysql_result($result, 0, 37) . " " . mysql_result($result, 0, 7));
            } else {
                $result = doQuery("SELECT * FROM " . HC_TblPrefix . "locations WHERE PkID = '" . cIn(mysql_result($result, 0, 35)) . "'");
                $link .= "&location=" . urlencode(mysql_result($result, 0, 2) . " " . mysql_result($result, 0, 3) . " " . mysql_result($result, 0, 4) . " " . mysql_result($result, 0, 5) . " " . mysql_result($result, 0, 6) . " " . mysql_result($result, 0, 7));
            }
            header("Location: {$link}");
            break;
    }
} else {
    header('Location: ' . CalRoot);
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:SaveEvent.php

示例4: while

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%;">&nbsp;</div>
			</li>';
    $cnt = 0;
    while ($row = mysql_fetch_row($result)) {
        $hl = $cnt % 2 == 1 ? ' hl' : '';
        echo '
			<li class="row ' . $hl . '">
				<div class="txt" style="width:30%;">' . cOut($row[2] . ', ' . $row[1]) . '</div>
				<div class="txt" style="width:40%;">' . cOut($row[3]) . '</div>
				<div class="txt" style="width:20%;">' . ($row[4] != '' ? stampToDate($row[4], $hc_cfg[24] . ' ' . $hc_cfg[23]) : 'N/A') . '</div>
				<div class="tools" style="width:10%;">
					<a href="' . AdminRoot . '/index.php?com=adminedit&amp;aID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/edit.png" width="16" height="16" alt="" /></a>
					<a href="javascript:;" onclick="doDelete(\'' . $row[0] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a>
				</div>
			</li>';
        ++$cnt;
    }
    echo '
		</ul>
		<script>
		//<!--
		function doDelete(dID){
			if(confirm("' . $hc_lang_admin['Valid07'] . '\\n\\n          ' . $hc_lang_admin['Valid08'] . '\\n          ' . $hc_lang_admin['Valid09'] . '")){
				document.location.href = "' . AdminRoot . '/components/AdminEditAction.php?dID=" + dID + "&tkn=' . set_form_token(1) . '";
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:AdminBrowse.php

示例5: cOut

$eventbriteGoogleID = cOut(mysql_result($result, 28, 0));
$eventbriteGoogleKey = cOut(mysql_result($result, 29, 0));
$twtrComKey = cOut(mysql_result($result, 30, 0));
$twtrComSec = cOut(mysql_result($result, 31, 0));
$twtrSignIn = cOut(mysql_result($result, 32, 0));
$fbSignIn = cOut(mysql_result($result, 33, 0));
$googSignIn = cOut(mysql_result($result, 34, 0));
$fbAppID = cOut(mysql_result($result, 35, 0));
$fbAppSec = cOut(mysql_result($result, 36, 0));
$fbConOpts = json_decode(cOut(mysql_result($result, 37, 0)), true);
$fbActiveT = cOut(mysql_result($result, 38, 0));
$fbTokenU = cOut(mysql_result($result, 39, 0));
$fbExpires = cOut(mysql_result($result, 40, 0));
$fbActiveI = cOut(mysql_result($result, 41, 0));
$googID = cOut(mysql_result($result, 42, 0));
$googSec = cOut(mysql_result($result, 43, 0));
$fbConOptsOut = '';
echo '
	<form name="frmSettings" id="frmSettings" method="post" action="' . AdminRoot . '/components/SettingsAPIAction.php" onsubmit="return validate();">';
set_form_token();
echo '
	<fieldset>
		<legend>' . $hc_lang_settings['Maps'] . '</legend>
		<label for="mapLibrary">' . $hc_lang_settings['Library'] . '</label>
		<select name="mapLibrary" id="mapLibrary" onchange="togMapLibrary(this.options[this.selectedIndex].value);">
			<option' . ($mapLibrary == 1 ? ' selected="selected"' : '') . ' value="1">' . $hc_lang_settings['Library1'] . '</option>
			<option' . ($mapLibrary == 2 ? ' selected="selected"' : '') . ' value="2">' . $hc_lang_settings['Library2'] . '</option>
		</select>
		<div id="library1" style="clear:both;' . ($mapLibrary != 1 ? ' display:none;' : '') . '">
			<label for="googMapURL">' . $hc_lang_settings['GoogMapURL'] . '</label>
			<input' . ($mapLibrary != 1 ? ' disabled="disabled"' : '') . ' name="googMapURL" id="googMapURL" type="url" size="30" maxlength="100" required="required" value="' . $googMapURL . '" />
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:SettingsAPI.php

示例6: header

/**
 * @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;
}
$errorMsg = '';
$result = doQuery("SELECT * FROM " . HC_TblPrefix . "settings WHERE PkID IN(5,6);");
if (!hasRows($result)) {
    $apiFail = true;
    $errorMsg = 'Eventbrite API Settings Unavailable.';
} else {
    $ebAPI = cOut(mysql_result($result, 0, 1));
    $ebUser = cOut(mysql_result($result, 1, 1));
    if ($ebAPI == '' || $ebUser == '') {
        $apiFail = true;
        $errorMsg = 'Eventbrite API Settings Missing.';
    } else {
        $ebSend = "/xml/payment_update?app_key=" . $ebAPI . "&user_key=" . $ebUser;
        $ebSend .= "&event_id=" . $ebID;
        if (isset($_POST['ebPaypal']) && $hc_cfg[103] != '') {
            $ebSend .= "&accept_paypal=1";
            $ebSend .= "&paypal_email=" . $hc_cfg[103];
        } else {
            $ebSend .= "&accept_paypal=0";
        }
        if (isset($_POST['ebGoogleC']) && $hc_cfg[104] != '' && $hc_cfg[105] != '') {
            $ebSend .= "&accept_google=1";
            $ebSend .= "&google_merchant_id=" . $hc_cfg[104];
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:PaymentEdit.php

示例7: doQuery

    echo '
	</ul>
	</div>';
}
$result = doQuery("SELECT FirstName, LastName, Email, RegisteredAt FROM " . HC_TblPrefix . "subscribers WHERE IsConfirm = 1 ORDER BY RegisteredAt DESC, LastName, FirstName LIMIT 50");
if (hasRows($result)) {
    echo '
	<ul class="data">
		<li class="row header uline">
			<div style="width:88%;">' . $hc_lang_reports['NewestUsers'] . '</div>
			<div style="width:10%;">' . $hc_lang_reports['Registered'] . '</div>
			<div style="width:2%;">&nbsp;</div>
		</li>
	</ul>
	<div class="ostat">
	<ul class="data">';
    $cnt = 0;
    while ($row = mysql_fetch_row($result)) {
        $hl = $cnt % 2 == 1 ? ' hl' : '';
        echo '
		<li class="row' . $hl . '">
			<div class="txt" title="' . cOut($row[0]) . '" style="width:30%;">' . cOut(trim($row[1] . ', ' . $row[0])) . '</div>
			<div style="width:60%;">' . cOut($row[2]) . '</div>
			<div class="number" style="width:10%;">' . stampToDate($row[3], $hc_cfg[24]) . '</div>
		</li>';
        ++$cnt;
    }
    echo '
	</ul>
	</div>';
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:ReportOverview.php

示例8: doQuery

    $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%;">&nbsp;</div>
		</li>';
        $cnt = 0;
        while ($row = mysql_fetch_row($result)) {
            $hl = $cnt % 2 == 1 ? ' hl' : '';
            echo '
		<li class="row' . $hl . '">
			<div style="width:50%;">' . cOut($row[1]) . '</div>
			<div style="width:20%;">' . ($row[2] == 1 ? $hc_lang_news['Public'] : $hc_lang_news['AdminOnly']) . '</div>
			<div class="number" style="width:20%;">' . ($row[0] == 1 ? number_format($row[4], 0, '.', ',') : number_format($row[3], 0, '.', ',')) . '</div>
			<div class="tools" style="width:10%;">
				<a href="' . AdminRoot . '/index.php?com=subgrps&amp;gID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/edit.png" width="16" height="16" alt="" /></a>
				' . ($row[0] > 1 ? '<a href="javascript:;" onclick="javascript:doDelete(\'' . $row[0] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a>' : '<img src="' . AdminRoot . '/img/spacer.gif" width="16" height="16" alt="" />') . '
			</div>
		</li>';
            ++$cnt;
        }
        echo '
	</ul>
	
	<script language="JavaScript" type="text/JavaScript">
	//<!--
	function doDelete(dID){
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:MailGroups.php

示例9: switch

    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>
		<label for="status">' . $hc_lang_pages['StatusD'] . '</label>
		<select name="status" id="status">
			<option' . ($status == 0 ? ' selected="selected"' : '') . ' value="0">' . $hc_lang_pages['StatusD0'] . '</option>
			<option' . ($status == 1 ? ' selected="selected"' : '') . ' value="1">' . $hc_lang_pages['StatusD1'] . '</option>
		</select>
		<span class="output">
			<a class="tooltip" data-tip="' . $hc_lang_pages['Tip01'] . '" href="javascript:;" tabindex="-1"><img src="' . AdminRoot . '/img/icons/info.png" width="16" height="16" alt="" /></a>
		</span>
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:Digest.php

示例10: while

				<div style="width:20%;">' . $hc_lang_reports['Date'] . '</div>
				<div class="txt" style="width:30%">' . $hc_lang_reports['User'] . '</div>
				<div class="tools" style="width:10%;">&nbsp;</div>
			</li>
		</ul>
		<ul class="data">
		<div class="prpt">';
    $cnt = 0;
    while ($row = mysql_fetch_row($result)) {
        $hl = $cnt % 2 == 1 ? ' hl' : '';
        echo '
			<li class="row' . $hl . '">
				<div class="txt" title="' . cOut($row[1]) . '" style="width:25%;">' . cOut('(' . $row[0] . ') ' . trim($row[1] . ' ' . $row[2])) . '</div>
				<div style="width:15%;">' . cOut($row[4]) . '</div>
				<div style="width:20%;">' . stampToDate($row[6], $hc_cfg[24] . ' ' . $hc_cfg[23]) . '</div>
				<div class="txt" title="' . cOut($row[5]) . '" style="width:30%;">' . cOut($row[5]) . '</div>
				<div class="tools" style="width:10%;">
					<a href="' . AdminRoot . '/index.php?com=adminedit&amp;aID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/user_edit.png" width="16" height="16" alt="" /></a>
					<a href="javascript:;" onclick="doDelete(\'' . $row[7] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a>
				</div>
			</li>';
        ++$cnt;
    }
    echo '
		</div>
		</ul>
		<script>
		//<!--
		function doDelete(dID){
			if(confirm("' . $hc_lang_reports['Valid04'] . '\\n\\n          ' . $hc_lang_reports['Valid05'] . '\\n          ' . $hc_lang_reports['Valid06'] . '")){
				document.location.href = "' . AdminRoot . '/components/ReportFailAction.php?dID=" + dID + "&tkn=' . set_form_token(1) . '";
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:ReportFail.php

示例11: doQuery

	<input type="submit" name="submit" id="submit" value="' . $hc_lang_manage['SaveCat'] . '" />
	</form>
	</div>
	<div class="catMgtList">
		<ul class="data">';
$result = doQuery("SELECT c.PkID, c.CategoryName, c.ParentID, c.CategoryName as Sort, NULL as Selected\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "categories c \r\n\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID)\r\n\t\t\t\t\tWHERE c.ParentID = 0 AND c.IsActive = 1\r\n\t\t\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID\r\n\t\t\t\t\tUNION SELECT c.PkID, c.CategoryName, c.ParentID, c2.CategoryName as Sort, NULL as Selected\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "categories c \r\n\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "categories c2 ON (c.ParentID = c2.PkID) \r\n\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID) \r\n\t\t\t\t\tWHERE c.ParentID > 0 AND c.IsActive = 1\r\n\t\t\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID, c2.CategoryName\r\n\t\t\t\t\tORDER BY Sort, ParentID, CategoryName");
$rowCnt = mysql_num_rows($result);
if (hasRows($result)) {
    $cnt = 0;
    $curCat = "";
    while ($row = mysql_fetch_row($result)) {
        $hl = $cnt % 2 == 1 ? ' hl' : '';
        $indent = $row[2] != 0 ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '';
        echo '
			<li class="row' . $hl . '">
				<div style="width:85%;">' . $indent . ($cID == $row[0] && $cID > 0 ? '<b>' . cOut($row[1]) . '</b>' : cOut($row[1])) . '</div>
				<div style="width:15%;">
					<a href="' . AdminRoot . '/index.php?com=categorymanage&amp;cID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/edit.png" width="16" height="16" alt="" /></a>
					' . ($rowCnt > 1 ? '<a href="javascript:;" onclick="doDelete(\'' . $row[0] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a>' : '') . '
				</div>
			</li>';
        $cnt++;
    }
    echo '
			</ul>
		<script>
		//<!--
		function doDelete(dID){
			if(confirm("' . $hc_lang_manage['Valid08'] . '\\n\\n          ' . $hc_lang_manage['Valid09'] . '\\n          ' . $hc_lang_manage['Valid10'] . '"))
				window.location.href = "' . AdminRoot . '/components/CategoryManageAction.php?dID=" + dID + "&tkn=' . $token . '";
		}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:CategoryManage.php

示例12: doQuery

$cleanup = "BLANK";
$dateFormat = 0;
$result = doQuery("SELECT * FROM " . HC_TblPrefix . "templates WHERE PkID = '" . $tID . "' AND IsActive = 1");
if (hasRows($result)) {
    $whereAmI = $hc_lang_tools['EditT'];
    $helpText = $hc_lang_tools['InstructEditTExp'];
    $name = cOut(mysql_result($result, 0, 1));
    $content = cOut(mysql_result($result, 0, 2));
    $header = cOut(mysql_result($result, 0, 3));
    $footer = cOut(mysql_result($result, 0, 4));
    $ext = cOut(mysql_result($result, 0, 5));
    $typeID = cOut(mysql_result($result, 0, 6));
    $groupBy = cOut(mysql_result($result, 0, 7));
    $sortBy = cOut(mysql_result($result, 0, 8));
    $cleanup = cOut(mysql_result($result, 0, 9));
    $dateFormat = cOut(mysql_result($result, 0, 10));
}
appInstructions(0, $helpDoc, $whereAmI, $helpText);
echo '
	<form name="frmExpTemp" id="frmExpTemp" method="post" action="' . AdminRoot . '/components/TemplatesEditAction.php" onsubmit="return validate();">';
set_form_token();
echo '
	<input type="hidden" name="tID" id="tID" value="' . $tID . '" />
	<input type="hidden" name="typeID" id="typeID" value="' . $typeID . '" />
	<fieldset>
		<legend>' . $hc_lang_tools['TempSettings'] . '</legend>
		<label for="name">' . $hc_lang_tools['Name'] . '</label>
		<input name="name" id="name" type="text" size="50" maxlength="255" required="required" value="' . $name . '" />
		<label for="ext">' . $hc_lang_tools['Extension'] . '</label>
		<input name="ext" id="ext" type="text" size="5" maxlength="15" required="required" value="' . $ext . '" />
		<label for="sort">' . $hc_lang_tools['Sort'] . '</label>
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:TemplatesEdit.php

示例13: getEventList

/**
 * Builds list of events for the template based on the passed query.
 * @param string $qry Columns: PkID, Title, StartDate, StartTime, IsBillboard, SeriesID, TBD, EndTime
 * @return string
 */
function getEventList($qry)
{
    global $hc_lang_news, $hc_cfg;
    $replace = $curDate = '';
    $hide = array();
    $cnt = 0;
    $result = doQuery($qry);
    $str = '<ul style="list-style:none;padding:0px;">';
    while ($row = mysql_fetch_row($result)) {
        if ($row[5] == '' || !in_array($row[5], $hide)) {
            if ($curDate != $row[2]) {
                $curDate = cOut($row[2]);
                $str .= '<li>' . stampToDate($row[2], $hc_cfg[14]) . '</li>';
            }
            $str .= '<li style="padding-left:15px;"><a href="' . CalRoot . '/index.php?eID=' . $row[0] . '" target="_blank">' . $row[1] . '</a>';
            if ($row[6] == 0) {
                $str .= ' - ' . strftime($hc_cfg[23], strtotime($row[3])) . '</li>';
            } elseif ($row[6] == 1) {
                $str .= ' - <i>' . $hc_lang_news['AllDay'] . '</i></li>';
            } elseif ($row[6] == 2) {
                $str .= ' - <i>' . $hc_lang_news['TBA'] . '</i></li>';
            }
        }
        if ($row[5] != '' && !in_array($row[5], $hide)) {
            $hide[] = $row[5];
        }
        ++$cnt;
    }
    $str .= '</ul>';
    return $str;
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:36,代码来源:NewsletterProgress.php

示例14: switch

        switch ($row[1]) {
            case 1:
                $net_img = 'twitter_icon';
                break;
            case 2:
                $net_img = 'facebook_icon';
                break;
            case 3:
                $net_img = 'google';
                break;
        }
        echo '
				<label' . $hl . ' for="usrValue_' . $row[0] . '"><input name="usrValue" id="usrValue_' . $row[0] . '" type="radio" onclick="setUser(' . $row[0] . ');" />
				<a href="' . AdminRoot . '/index.php?com=useredit&uID=' . $row[0] . '" target="_blank"><img src="' . AdminRoot . '/img/icons/user_edit.png" width="16" height="16" alt="" /></a>
				<img src="' . AdminRoot . '/img/logos/' . $net_img . '.png" width="16" height="16" style="float:none;" />
				' . ($row[4] != '' ? '<a href="mailto:' . $row[4] . '">' . cOut($row[2]) . '</a>' : cOut($row[2])) . '
				(' . $row[10] . ' ' . $hc_lang_user['Events'] . ')
				</label>';
        ++$x;
    }
    $pages = ceil(mysql_result($resultP, 0, 0) / $resLimit);
    if ($pages > 1) {
        echo '<div id="pages">';
        for ($x = 0; $x < $pages; ++$x) {
            if ($x % 20 == 0 && $x > 0) {
                echo "<br /><br />";
            } elseif ($x > 0) {
                echo "&nbsp;|&nbsp;";
            }
            echo $resOffset != $x ? '<a href="javascript:;" onclick="searchUsers(' . $x . ');">' . ($x + 1) . '</a>' : '<b>' . ($x + 1) . '</b>';
        }
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:user-search.php

示例15: header

    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;
        }
    }
}
sort($themes);
foreach ($themes as $val) {
    $fullsiteOpts .= '
			<option' . ($val == $fullsite ? ' selected="selected"' : '') . ' value="' . $val . '">' . ucfirst($val) . '</option>';
    $mobileOpts .= '
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:SettingsTheme.php


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