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


PHP ampReplace函数代码示例

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


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

示例1: botVoting

function botVoting(&$row, &$params, $page = 0)
{
    global $Itemid, $task;
    $id = $row->id;
    $option = 'com_content';
    $html = '';
    if ($params->get('rating') && !$params->get('popup')) {
        $html .= '<form method="post" action="' . sefRelToAbs('index.php') . '">';
        $img = '';
        // look for images in template if available
        $starImageOn = mosAdminMenus::ImageCheck('rating_star.png', '/images/M_images/');
        $starImageOff = mosAdminMenus::ImageCheck('rating_star_blank.png', '/images/M_images/');
        for ($i = 0; $i < $row->rating; $i++) {
            $img .= $starImageOn;
        }
        for ($i = $row->rating; $i < 5; $i++) {
            $img .= $starImageOff;
        }
        $html .= '<span class="content_rating">';
        $html .= _USER_RATING . ':' . $img . '&nbsp;/&nbsp;';
        $html .= intval($row->rating_count);
        $html .= "</span>\n<br />\n";
        $url = @$_SERVER['REQUEST_URI'];
        $url = ampReplace($url);
        if (!$params->get('intro_only') && $task != "blogsection") {
            $html .= '<span class="content_vote">';
            $html .= _VOTE_POOR;
            $html .= '<input type="radio" alt="vote 1 star" name="user_rating" value="1" />';
            $html .= '<input type="radio" alt="vote 2 star" name="user_rating" value="2" />';
            $html .= '<input type="radio" alt="vote 3 star" name="user_rating" value="3" />';
            $html .= '<input type="radio" alt="vote 4 star" name="user_rating" value="4" />';
            $html .= '<input type="radio" alt="vote 5 star" name="user_rating" value="5" checked="checked" />';
            $html .= _VOTE_BEST;
            $html .= '&nbsp;<input class="button" type="submit" name="submit_vote" value="' . _RATE_BUTTON . '" />';
            $html .= '<input type="hidden" name="task" value="vote" />';
            $html .= '<input type="hidden" name="pop" value="0" />';
            $html .= '<input type="hidden" name="option" value="com_content" />';
            $html .= '<input type="hidden" name="Itemid" value="' . $Itemid . '" />';
            $html .= '<input type="hidden" name="cid" value="' . $id . '" />';
            $html .= '<input type="hidden" name="url" value="' . $url . '" />';
            $html .= '</span>';
        }
        $html .= '</form>';
    }
    return $html;
}
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:46,代码来源:mosvote.php

示例2: saveContent

/**
* Saves the content item an edit form submit
*/
function saveContent(&$access, $task)
{
    global $database, $mainframe, $my;
    global $mosConfig_absolute_path, $mosConfig_offset, $Itemid;
    // simple spoof check security
    josSpoofCheck();
    $nullDate = $database->getNullDate();
    $row = new mosContent($database);
    if (!$row->bind($_POST)) {
        echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    // sanitise id field
    $row->id = (int) $row->id;
    $isNew = $row->id < 1;
    if ($isNew) {
        // new record
        if (!($access->canEdit || $access->canEditOwn)) {
            mosNotAuth();
            return;
        }
        $row->created = date('Y-m-d H:i:s');
        $row->created_by = $my->id;
    } else {
        // existing record
        if (!($access->canEdit || $access->canEditOwn && $row->created_by == $my->id)) {
            mosNotAuth();
            return;
        }
        $row->modified = date('Y-m-d H:i:s');
        $row->modified_by = $my->id;
    }
    if (strlen(trim($row->publish_up)) <= 10) {
        $row->publish_up .= ' 00:00:00';
    }
    $row->publish_up = mosFormatDate($row->publish_up, _CURRENT_SERVER_TIME_FORMAT, -$mosConfig_offset);
    if (trim($row->publish_down) == 'Never' || trim($row->publish_down) == '') {
        $row->publish_down = $nullDate;
    } else {
        if (strlen(trim($row->publish_down)) <= 10) {
            $row->publish_down .= ' 00:00:00';
        }
        $row->publish_down = mosFormatDate($row->publish_down, _CURRENT_SERVER_TIME_FORMAT, -$mosConfig_offset);
    }
    // code cleaner for xhtml transitional compliance
    $row->introtext = str_replace('<br>', '<br />', $row->introtext);
    $row->fulltext = str_replace('<br>', '<br />', $row->fulltext);
    // remove <br /> take being automatically added to empty fulltext
    $length = strlen($row->fulltext) < 9;
    $search = strstr($row->fulltext, '<br />');
    if ($length && $search) {
        $row->fulltext = NULL;
    }
    $row->title = ampReplace($row->title);
    // Publishing state hardening for Authors
    if (!$access->canPublish) {
        if ($isNew) {
            // For new items - author is not allowed to publish - prevent them from doing so
            $row->state = 0;
        } else {
            // For existing items keep existing state - author is not allowed to change status
            $query = "SELECT state" . "\n FROM #__content" . "\n WHERE id = " . (int) $row->id;
            $database->setQuery($query);
            $state = $database->loadResult();
            if ($state) {
                $row->state = 1;
            } else {
                $row->state = 0;
            }
        }
    }
    if (!$row->check()) {
        echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    $row->version++;
    if (!$row->store()) {
        echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    // manage frontpage items
    require_once $mainframe->getPath('class', 'com_frontpage');
    $fp = new mosFrontPage($database);
    if (intval(mosGetParam($_REQUEST, 'frontpage', 0))) {
        // toggles go to first place
        if (!$fp->load((int) $row->id)) {
            // new entry
            $query = "INSERT INTO #__content_frontpage" . "\n VALUES ( " . (int) $row->id . ", 1 )";
            $database->setQuery($query);
            if (!$database->query()) {
                echo "<script> alert('" . $database->stderr() . "');</script>\n";
                exit;
            }
            $fp->ordering = 1;
        }
    } else {
        // no frontpage mask
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:101,代码来源:content.php

示例3: menuLink

function menuLink($option, $id)
{
    global $database;
    josSpoofCheck();
    $menu = strval(mosGetParam($_POST, 'menuselect', ''));
    $link = strval(mosGetParam($_POST, 'link_name', ''));
    $link = stripslashes(ampReplace($link));
    $row = new mosMenu($database);
    $row->menutype = $menu;
    $row->name = $link;
    $row->type = 'content_typed';
    $row->published = 1;
    $row->componentid = $id;
    $row->link = 'index.php?option=com_content&task=view&id=' . $id;
    $row->ordering = 9999;
    if (!$row->check()) {
        echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    if (!$row->store()) {
        echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    $row->checkin();
    $row->updateOrder("menutype=" . $database->Quote($row->menutype) . " AND parent=" . (int) $row->parent);
    // clean any existing cache files
    mosCache::cleanCache('com_content');
    $msg = $link . ' (Link - Static Content) in menu: ' . $menu . ' successfully created';
    mosRedirect('index2.php?option=' . $option . '&task=edit&hidemainmenu=1&id=' . $id, $msg);
}
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:30,代码来源:admin.typedcontent.php

示例4: JLMS_showTopMenu


//.........这里部分代码省略.........
                        if ($menu->task == 'view_all_notices' && !$JLMS_CONFIG->get('flms_integration', 0)) {
                        } else {
                            // check user permissions (14.09.2008 - DEN)
                            /*if (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_DOCS') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('docs');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_QUIZZES') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('quizzes');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_LINKS') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('links');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_LPATH') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('lpaths');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_AGENDA') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('announce');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_ATTEND') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('attendance');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_CHAT') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('chat');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_CONF') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('conference');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_GRADEBOOK') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('gradebook');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_TRACK') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('tracking');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_MAILBOX') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('mailbox');
                            		} elseif (isset($menu->lang_var) && $menu->lang_var == '_JLMS_TOOLBAR_USERS') {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('users');
                            		} elseif (isset($menu->user_options) && $menu->user_options) {
                            			$is_shown = $JLMS_ACL->CheckToolPermissions('user_settings');
                            		}*/
                            if ($is_shown) {
                                $was_separator = false;
                                if (isset($menu->help_task) && $menu->help_task) {
                                    $help_link = ampReplace(str_replace('{toolname}', $help_task, $help_link));
                                    $menu->menulink = $help_link;
                                }
                                if (isset($menu->user_options) && $menu->user_options) {
                                } else {
                                    $lang_var_menu = '';
                                    if ($menu->lang_var && defined($menu->lang_var)) {
                                        $lang_var_menu = constant($menu->lang_var);
                                    } elseif (isset($JLMS_LANGUAGE[$menu->lang_var]) && $JLMS_LANGUAGE[$menu->lang_var]) {
                                        $lang_var_menu = $JLMS_LANGUAGE[$menu->lang_var];
                                    }
                                    $add = '';
                                    if ($JLMS_CONFIG->get('lofe_show_head', true)) {
                                        $add = "onmouseover='javascript:jlms_ShowTBToolTip(\"" . $lang_var_menu . "\");jlms_WStatus(\"" . $lang_var_menu . "\");return true;' " . $menu->target . " onmouseout='javascript:jlms_ShowTBToolTip(\"" . $back_status . "\");jlms_WStatus(\"\");return true;'";
                                    }
                                    ?>
							<a <?php 
                                    echo $add;
                                    ?>
 class="jlms_menu_control" href="<?php 
                                    echo $menu->menulink;
                                    ?>
" title="<?php 
                                    echo $lang_var_menu;
                                    ?>
"><img class='JLMS_png' src="<?php 
                                    echo $JLMS_CONFIG->get('live_site');
                                    ?>
/components/com_joomla_lms/lms_images/<?php 
                                    echo $imp . "/" . $menu->image;
                                    ?>
" border="0" width="<?php 
                                    echo $imh;
开发者ID:parkmi,项目名称:dolschool14,代码行数:67,代码来源:jlms_menu.php

示例5: edit

    function edit(&$menu, &$lists, &$params, $option)
    {
        /* in the HTML below, references to "section" were changed to "category" */
        global $mosConfig_live_site;
        ?>
		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton) {
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			var form = document.adminForm;
			<?php 
        if (!$menu->id) {
            ?>
				if ( form.name.value == '' ) {
					alert( 'This Menu item must have a title' );
					return;
				} else {
					submitform( pressbutton );
				}
				<?php 
        } else {
            ?>
				if ( form.name.value == '' ) {
					alert( 'This Menu item must have a title' );
				} else {
					submitform( pressbutton );
				}
				<?php 
        }
        ?>
		}
		</script>

		<form action="index2.php" method="post" name="adminForm">

		<table class="adminheading">
		<tr>
			<th>
			<?php 
        echo $menu->id ? 'Edit' : 'Add';
        ?>
 Menu Item :: Blog - Content Category
			</th>
		</tr>
		</table>

		<table width="100%">
		<tr valign="top">
			<td width="60%">
				<table class="adminform">
				<tr>
					<th colspan="3">
					Details
					</th>
				</tr>
				<tr>
					<td width="10%" align="right">Name:</td>
					<td width="200px">
					<input class="inputbox" type="text" name="name" size="30" maxlength="100" value="<?php 
        echo htmlspecialchars($menu->name, ENT_QUOTES);
        ?>
" />
					</td>
					<td>
					</td>
				</tr>
				<tr>
			  		<td valign="top" align="right">
			  		Category:
			  		</td>
			 		<td>
			  		<?php 
        echo $lists['categoryid'];
        ?>
			 		</td>
			 		<td valign="top">
			 		<?php 
        echo mosToolTip('You can select multiple Categories');
        ?>
			  		</td>
				</tr>
				<tr>
					<td align="right">URL:</td>
					<td colspan="2">
                    <?php 
        echo ampReplace($lists['link']);
        ?>
					</td>
				</tr>
				<tr>
					<td align="right">Parent Item:</td>
					<td colspan="2">
					<?php 
        echo $lists['parent'];
        ?>
					</td>
				</tr>
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:101,代码来源:content_blog_category.menu.html.php

示例6: editContent


//.........这里部分代码省略.........
				<?php 
        echo _E_FINISH_PUB;
        ?>
				</td>
				<td>
				<input class="inputbox" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
				<input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');" />
				</td>
			</tr>
			<tr>
				<td align="left">
				<?php 
        echo _E_SHOW_FP;
        ?>
				</td>
				<td>
				<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab(_E_METADATA, 'meta-page');
        ?>
			<table class="adminform">
			<tr>
				<td align="left" valign="top">
				<?php 
        echo _E_M_DESC;
        ?>
				</td>
				<td>
				<textarea class="inputbox" cols="45" rows="3" name="metadesc"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
				</td>
			</tr>
			<tr>
				<td align="left" valign="top">
				<?php 
        echo _E_M_KEY;
        ?>
				</td>
				<td>
				<textarea class="inputbox" cols="45" rows="3" name="metakey"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>

		<div style="clear:both;"></div>

		<input type="hidden" name="images" value="" />
		<input type="hidden" name="goodexit" value="0" />
		<input type="hidden" name="option" value="com_content" />
		<input type="hidden" name="Returnid" value="<?php 
        echo $Returnid;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="version" value="<?php 
        echo $row->version;
        ?>
" />
		<input type="hidden" name="sectionid" value="<?php 
        echo $row->sectionid;
        ?>
" />
		<input type="hidden" name="created_by" value="<?php 
        echo $row->created_by;
        ?>
" />
		<input type="hidden" name="referer" value="<?php 
        echo ampReplace(@$_SERVER['HTTP_REFERER']);
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="<?php 
        echo $validate;
        ?>
" value="1" />
		</form>
		<?php 
    }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:101,代码来源:content.html.php

示例7: showUserGroups


//.........这里部分代码省略.........
					<td><?php 
            $link = "index.php?option=" . $option . "&amp;Itemid=" . $Itemid . "&amp;task=view_users&amp;course_id=" . $course_id . "&amp;id=0";
            ?>
						<a href="<?php 
            echo sefRelToAbs($link);
            ?>
" title="<?php 
            echo _JLMS_USERS_GROUP_LINK_TITLE;
            ?>
">
							<?php 
            echo _JLMS_USER_NO_GROUP_NAME;
            ?>
						</a>
					</td>
					<td><?php 
            echo _JLMS_USER_ASSIST_GROUP_DESCR;
            ?>
</td>
				</tr>
			<?php 
        }
        $k = 1;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row = $rows[$i];
            $link = "index.php?option=" . $option . "&amp;Itemid=" . $Itemid . "&amp;task=view_users&amp;course_id=" . $course_id . "&amp;id=" . $row->id;
            $checked = mosHTML::idBox($i + 1, $row->id);
            if (!$JLMS_ACL->CheckPermissions('users', 'manage')) {
                $checked = '&nbsp;';
            }
            ?>
				<tr class="<?php 
            echo JLMSCSS::_('sectiontableentry' . $k);
            ?>
">
					<td align="center"><?php 
            echo $i + 1;
            ?>
</td>
					<td><?php 
            echo $checked;
            ?>
</td>
					<td align="left">
						<a href="<?php 
            echo sefRelToAbs($link);
            ?>
" title="<?php 
            echo _JLMS_USERS_GROUP_LINK_TITLE;
            ?>
">
							<?php 
            echo $row->ug_name;
            ?>
						</a>
					</td>
					<td><?php 
            echo $row->ug_description;
            ?>
</td>
				</tr>
				<?php 
            $k = 3 - $k;
        }
        ?>
			</table>
			<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
			<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
			<input type="hidden" name="task" value="course_users" />
			<input type="hidden" name="id" value="<?php 
        echo $course_id;
        ?>
" />
			<input type="hidden" name="boxchecked" value="0" />
			<input type="hidden" name="row_id" value="0" />
			<input type="hidden" name="state" value="0" />
		</form>
<?php 
        JLMS_TMPL::CloseTS();
        $link_new = "index.php?option=" . $option . "&amp;Itemid=" . $Itemid . "&amp;task=new_usergroup&amp;id=" . $course_id;
        $link_csvdelete = "index.php?option=" . $option . "&amp;Itemid=" . $Itemid . "&amp;task=user_csv_delete&amp;id=" . $course_id;
        $controls = array();
        if ($JLMS_ACL->CheckPermissions('users', 'manage')) {
            $controls[] = array('href' => "javascript:submitbutton('export_usergroup');", 'title' => _JLMS_USER_ALT_EXPGROUP, 'img' => 'export');
            $controls[] = array('href' => 'spacer');
            $controls[] = array('href' => ampReplace(sefRelToAbs($link_new)), 'title' => _JLMS_USER_ALT_NEWGROUP, 'img' => 'addusergroup');
            $controls[] = array('href' => "javascript:submitbutton('usergroup_delete');", 'title' => _JLMS_USER_ALT_DELGROUP, 'img' => 'delusergroup');
            $controls[] = array('href' => "javascript:submitbutton('edit_usergroup');", 'title' => _JLMS_USER_ALT_EDITGROUP, 'img' => 'editusergroup');
            $controls[] = array('href' => 'spacer');
            $controls[] = array('href' => ampReplace(sefRelToAbs($link_csvdelete)), 'title' => _JLMS_USERS_CSV_DELETE, 'img' => 'delete');
        }
        JLMS_TMPL::ShowControlsFooter($controls);
        JLMS_TMPL::CloseMT();
    }
开发者ID:parkmi,项目名称:dolschool14,代码行数:101,代码来源:joomla_lms.course_users.html.php

示例8: display

    public static function display(&$rows, $params, $pageNav, $limitstart, $limit, $total, $totalRows, $searchword)
    {
        global $mosConfig_hideCreateDate;
        global $mosConfig_live_site, $option, $Itemid;
        $c = count($rows);
        $image = mosAdminMenus::ImageCheck('google.png', '/images/M_images/', NULL, NULL, 'Google', 'Google', 1);
        $searchword = urldecode($searchword);
        $searchword = htmlspecialchars($searchword, ENT_QUOTES);
        // number of matches found
        echo '<br/>';
        eval('echo "' . _CONCLUSION . '";');
        ?>
				<a href="http://www.google.com/search?q=<?php 
        echo $searchword;
        ?>
" target="_blank">
					<?php 
        echo $image;
        ?>
</a>
			</td>
		</tr>
		</table>

		<br />

		<div align="center">
			<?php 
        echo $pageNav->writePagesCounter();
        $ordering = strtolower(strval(mosGetParam($_REQUEST, 'ordering', 'newest')));
        $searchphrase = strtolower(strval(mosGetParam($_REQUEST, 'searchphrase', 'any')));
        $searchphrase = htmlspecialchars($searchphrase);
        $cleanWord = htmlspecialchars($searchword);
        $link = $mosConfig_live_site . "/index.php?option={$option}&amp;Itemid={$Itemid}&amp;searchword={$cleanWord}&amp;searchphrase={$searchphrase}&amp;ordering={$ordering}";
        echo $pageNav->getLimitBox($link);
        ?>
		</div>
		<table class="contentpaneopen<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<tr class="<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
			<td>
				<?php 
        $z = $limitstart + 1;
        $end = $limit + $z;
        if ($end > $total) {
            $end = $total + 1;
        }
        for ($i = $z; $i < $end; $i++) {
            $row = $rows[$i - 1];
            if ($row->created) {
                $created = mosFormatDate($row->created, _DATE_FORMAT_LC);
            } else {
                $created = '';
            }
            ?>
					<fieldset>
						<div>
							<span class="small<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
								<?php 
            echo $i . '. ';
            ?>
							</span>
							<?php 
            if ($row->href) {
                $row->href = ampReplace($row->href);
                if ($row->browsernav == 1) {
                    ?>
									<a href="<?php 
                    echo sefRelToAbs($row->href);
                    ?>
" target="_blank">
									<?php 
                } else {
                    ?>
									<a href="<?php 
                    echo sefRelToAbs($row->href);
                    ?>
">
									<?php 
                }
            }
            echo $row->title;
            if ($row->href) {
                ?>
								</a>
								<?php 
            }
            if ($row->section) {
                ?>
								<br/>
								<span class="small<?php 
                echo $params->get('pageclass_sfx');
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:101,代码来源:search.html.php

示例9: formStart

    function formStart($javascriptType = '', $html = 0, $images = null)
    {
        global $_VERSION;
        $joomAca15 = $_VERSION->RELEASE != '1.0' && class_exists('JFactory') ? true : false;
        if ($joomAca15) {
            $editor =& JFactory::getEditor();
        }
        mosCommonHTML::loadOverlib();
        echo '<script language="javascript" type="text/javascript">';
        switch ($javascriptType) {
            case 'edit_mailing':
                if (!$joomAca15) {
                    ?>
					var folderimages = new Array;
					<?php 
                    $i = 0;
                    foreach ($images as $k => $items) {
                        foreach ($items as $v) {
                            echo "folderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes(ampReplace($v->value)) . "','" . addslashes(ampReplace($v->text)) . "' );\t";
                        }
                    }
                }
                ?>

			function submitbutton(pressbutton) {
				var form = document.adminForm;
				if (pressbutton == 'show') {
					submitform( pressbutton );
					return;
				}
				<?php 
                if (!$joomAca15) {
                    ?>
					var temp = new Array;
					for (var i=0, n=form.imagelist.options.length; i < n; i++) {
						temp[i] = form.imagelist.options[i].value;
					}
					form.images.value = temp.join( '\n' );
				<?php 
                }
                ?>
				if (form.subject.value == ""){
					alert( "Mailing must have a title" );
				} else {
					<?php 
                if ($html != 0) {
                    if ($joomAca15) {
                        echo $editor->save('content');
                    } else {
                        getEditorContents('editor1', 'content');
                    }
                }
                ?>
					if(pressbutton){
						if (pressbutton == 'saveSend') {
							if (!confirm('Are you sure you want to proceed?')){return;}
							form.action = 'index2.php?option=com_acajoom&act=mailing';
						}
						form.task.value=pressbutton;
					}
					form.submit();
				}
			}
		<?php 
                break;
            case 'show_mailing':
                ?>
			function checkcid(myField) {
				myField.checked = true;
				isChecked(true);
			}
			function submitbutton(pressbutton) {
				var form = document.adminForm;
				if (pressbutton == 'cancel') {
					submitform( pressbutton );
					return;
				}
				if (pressbutton == 'sendNewsletter') {
					if (!confirm('Are you sure you want to proceed?')){return;}
					form.action = 'index2.php?option=com_acajoom&act=mailing';
				}
				submitform( pressbutton );
			}
			<?php 
                break;
            case 'configpanel':
                ?>
			function submitbutton(pressbutton) {
				var form = document.adminForm;
				if (pressbutton == 'cancel') {
					submitform( pressbutton );
					return;
				}
				if (pressbutton == 'sendQueue') {
					form.action = 'index2.php?option=com_acajoom&act=mailing';
				}
				submitform( pressbutton );
			}
			<?php 
                break;
//.........这里部分代码省略.........
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:101,代码来源:admin.acajoom.html.php

示例10: defined

* @author Mambo Foundation Inc see README.php
* @copyright Mambo Foundation Inc.
* See COPYRIGHT.php for copyright notices and details.
* @license GNU/GPL Version 2, see LICENSE.php
* Mambo is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 of the License.
*/
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
// load the html drawing class
require_once $mainframe->getPath('front_html');
global $database, $my;
global $mosConfig_live_site;
$return = mosGetParam($_SERVER, 'REQUEST_URI', null);
$return = ampReplace($return);
$menuhandler =& mosMenuHandler::getInstance();
$menu =& $menuhandler->getMenuByID($Itemid);
$params =& new mosParameters($menu->params);
$params->def('page_title', 1);
$params->def('header_login', $menu->name);
$params->def('header_logout', $menu->name);
$params->def('pageclass_sfx', '');
$params->def('back_button', $mainframe->getCfg('back_button'));
$params->def('login', $mosConfig_live_site);
$params->def('logout', $mosConfig_live_site);
$params->def('login_message', 0);
$params->def('logout_message', 0);
$params->def('description_login', 1);
$params->def('description_logout', 1);
$params->def('description_login_text', T_('To access the Private areas of this site please Login'));
开发者ID:jwest00724,项目名称:mambo,代码行数:31,代码来源:login.php

示例11: JLMS_saveCertificate

 function JLMS_saveCertificate($course_id, $option, $crtf_type, $redirect_url = '')
 {
     global $my, $JLMS_DB, $Itemid;
     $JLMS_ACL =& JLMSFactory::getACL();
     $crtf_id = 0;
     /*echo '<pre>';
     	print_r($_REQUEST);*/
     if ($course_id && $JLMS_ACL->CheckPermissions('docs', 'view')) {
         $crtf_name = isset($_REQUEST['crtf_name']) ? $_REQUEST['crtf_name'] : '';
         $crtf_name = get_magic_quotes_gpc() ? stripslashes($crtf_name) : $crtf_name;
         $crtf_name = ampReplace(strip_tags($crtf_name));
         $crtf_name = $JLMS_DB->GetEscaped($crtf_name);
         $crtf_text = isset($_REQUEST['crtf_text']) ? $_REQUEST['crtf_text'] : '';
         $crtf_text = get_magic_quotes_gpc() ? stripslashes($crtf_text) : $crtf_text;
         $crtf_text = ampReplace(strip_tags($crtf_text));
         $crtf_text = $JLMS_DB->GetEscaped($crtf_text);
         $crtf_align = intval(mosGetParam($_REQUEST, 'crtf_align', 0));
         $published = intval(mosGetParam($_REQUEST, 'published', 1));
         $crtf_shadow = intval(mosGetParam($_REQUEST, 'crtf_shadow', 0));
         $crtf_font = strval(mosGetParam($_REQUEST, 'crtf_font', 0));
         if (!preg_match("/^[a-zA-Z0-9\\-\\_\\s]+\\.ttf\$/", $crtf_font)) {
             $crtf_font = 'arial.ttf';
         }
         if ($crtf_shadow) {
             $crtf_shadow = 1;
         }
         if (!in_array($crtf_align, array(0, 1, 2))) {
             $crtf_align = 0;
         }
         $text_x = intval(mosGetParam($_REQUEST, 'text_x', 0));
         $text_y = intval(mosGetParam($_REQUEST, 'text_y', 0));
         $text_size = intval(mosGetParam($_REQUEST, 'text_size', 0));
         $new_file = false;
         $file_id = 0;
         if (isset($_FILES['userfile']) && !empty($_FILES['userfile']['name'])) {
             $file_id = JLMS_uploadFile($course_id);
             $new_file = true;
         }
         $add_query = '';
         $crtf_id = 0;
         if ($crtf_type == 2) {
             $crtf_id = intval(mosGetParam($_REQUEST, 'crtf_id', 0));
             $add_query = " AND id = '" . $crtf_id . "'";
         }
         $query = "SELECT * FROM #__lms_certificates WHERE course_id = '" . $course_id . "' AND crtf_type = '" . $crtf_type . "' AND parent_id = 0" . $add_query;
         $JLMS_DB->SetQuery($query);
         $old_crt = $JLMS_DB->LoadObjectList();
         if (count($old_crt)) {
             $old_file = $old_crt[0]->file_id;
             if ($old_file && $new_file) {
                 $files = array();
                 $files[] = $old_file;
                 JLMS_deleteFiles($files);
             }
             $crtf_id = $old_crt[0]->id;
             $query = "UPDATE #__lms_certificates SET published = {$published}, crtf_name = '" . $crtf_name . "', crtf_text = '" . $crtf_text . "', crtf_align = {$crtf_align}, crtf_shadow = {$crtf_shadow}, text_x = '" . $text_x . "', text_y = '" . $text_y . "', text_size = '" . $text_size . "', crtf_font = " . $JLMS_DB->quote($crtf_font) . "" . ($new_file ? ", file_id = '" . $file_id . "'" : '') . " WHERE course_id = '" . $course_id . "' AND crtf_type = '" . $crtf_type . "' AND parent_id = 0" . $add_query;
             $JLMS_DB->SetQuery($query);
             $JLMS_DB->query();
         } else {
             $query = "INSERT INTO #__lms_certificates (parent_id, course_id, published, crtf_name, crtf_text, crtf_align, crtf_shadow, text_x, text_y, text_size" . ($new_file ? ", file_id" : '') . ", crtf_type, crtf_font) VALUES ( 0, '" . $course_id . "', '" . $published . "', '" . $crtf_name . "', '" . $crtf_text . "', {$crtf_align}, {$crtf_shadow}, '" . $text_x . "', '" . $text_y . "', '" . $text_size . "'" . ($new_file ? ",'" . $file_id . "'" : '') . ", '" . $crtf_type . "', " . $JLMS_DB->quote($crtf_font) . ")";
             $JLMS_DB->SetQuery($query);
             $JLMS_DB->query();
             $crtf_id = $JLMS_DB->insertid();
         }
         $crtf_id = intval($crtf_id);
         /* 23 october 2007 - (DEN) */
         /* handle custom text fields */
         $ctxt_mes_ids = josGetArrayInts('ctxt_mes_id', $_REQUEST);
         $ctxt_mes_text = isset($_REQUEST['ctxt_mes_text']) ? $_REQUEST['ctxt_mes_text'] : array();
         $ctxt_mes_shadow_hid = mosGetParam($_REQUEST, 'ctxt_mes_shadow_hid', array());
         $ctxt_mes_x = mosGetParam($_REQUEST, 'ctxt_mes_x', array());
         $ctxt_mes_y = mosGetParam($_REQUEST, 'ctxt_mes_y', array());
         $ctxt_mes_h = mosGetParam($_REQUEST, 'ctxt_mes_h', array());
         $ctxt_mes_font = mosGetParam($_REQUEST, 'ctxt_mes_font', array());
         $p_ids = array();
         $i = 0;
         $add_cmes_ids = array();
         /*print_r($ctxt_mes_ids);*/
         foreach ($ctxt_mes_ids as $cmid) {
             if (isset($ctxt_mes_text[$i]) && isset($ctxt_mes_x[$i]) && isset($ctxt_mes_y[$i]) && isset($ctxt_mes_h[$i]) && isset($ctxt_mes_font[$i]) && isset($ctxt_mes_shadow_hid[$i]) && $ctxt_mes_text[$i]) {
                 $crtf_shadow = $ctxt_mes_shadow_hid[$i] ? 1 : 0;
                 $crtf_font = '';
                 $text_x = intval($ctxt_mes_x[$i]);
                 if ($text_x < 0) {
                     $text_x = 0;
                 }
                 $text_y = intval($ctxt_mes_y[$i]);
                 if ($text_y < 0) {
                     $text_y = 0;
                 }
                 $text_size = intval($ctxt_mes_h[$i]);
                 if ($text_size < 0) {
                     $text_size = 0;
                 }
                 $crtf_text = $ctxt_mes_text[$i];
                 $crtf_text = get_magic_quotes_gpc() ? stripslashes($crtf_text) : $crtf_text;
                 $crtf_text = ampReplace(strip_tags($crtf_text));
                 $crtf_text = $JLMS_DB->GetEscaped($crtf_text);
                 $crtf_font = strval($ctxt_mes_font[$i]);
                 if (!preg_match("/^[a-zA-Z0-9\\-\\_\\s]+\\.ttf\$/", $crtf_font)) {
//.........这里部分代码省略.........
开发者ID:parkmi,项目名称:dolschool14,代码行数:101,代码来源:lms_certificates.php

示例12: showCourseDetails

    function showCourseDetails($id, &$row, &$params, $option, &$lists, $view_type = 'view')
    {
        $_JLMS_PLUGINS =& JLMSFactory::getPlugins();
        global $Itemid, $my, $JLMS_CONFIG, $JLMS_SESSION;
        $count_modules = 0;
        $JLMS_ACL =& JLMSFactory::getACL();
        if ($JLMS_ACL->GetRole() && !$JLMS_ACL->isStaff()) {
            if ($params->get('homework_view') && $JLMS_CONFIG->get('course_homework')) {
                $count_modules++;
            }
            if ($params->get('agenda_view')) {
                $count_modules++;
            }
            if ($params->get('dropbox_view')) {
                $count_modules++;
            }
            if ($params->get('mailbox_view')) {
                $count_modules++;
            }
            if ($params->get('certificates_view')) {
                $count_modules++;
            }
            if ($params->get('latest_forum_posts_view')) {
                $count_modules++;
            }
            if ($count_modules) {
                ?>
		
		<?php 
            }
        }
        JLMS_TMPL::OpenMT();
        $hparams = array();
        if ($view_type == 'view') {
            $hparams['simple_menu'] = true;
            $hparams['sys_msg'] = _JLMS_MESSAGE_SHORT_COURSE_INFO;
        }
        if ($view_type == 'offerWL') {
            $hparams['sys_msg'] = _JLMS_MESSAGE_OFFER_JOIN_WAITING_LIST;
        } elseif ($view_type == 'inWL') {
            $hparams['sys_msg'] = _JLMS_MESSAGE_ALREADY_IN_WATING_LIST;
            $JLMS_CONFIG->set('enableterms', 0);
        }
        if ($JLMS_SESSION->get('joomlalms_just_joined', 0)) {
            if (isset($hparams['sys_msg'])) {
                $hparams['sys_msg'] = $JLMS_SESSION->get('joomlalms_sys_message', '') . '<br />' . $hparams['sys_msg'];
            } else {
                $hparams['sys_msg'] = $JLMS_SESSION->get('joomlalms_sys_message', '');
            }
            $JLMS_SESSION->clear('joomlalms_just_joined');
        }
        $toolbar = array();
        $JLMS_ACL =& JLMSFactory::getACL();
        if ($JLMS_ACL->CheckPermissions('course', 'manage_settings')) {
            $toolbar[] = array('btn_type' => 'newtopic', 'btn_js' => "index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=add_topic&amp;id={$id}", 'btn_str' => _JLMS_TOPIC_T_ADD);
            $toolbar[] = array('btn_type' => 'settings', 'btn_js' => sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=settings&amp;id={$id}"));
            $toolbar[] = array('btn_type' => 'edit', 'btn_js' => ampReplace(sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=edit_course&amp;id={$id}&amp;is_inside=1")));
        } elseif ($view_type == 'view' || $view_type == 'offerWL' || $view_type == 'inWL') {
            $hparams['simple_menu'] = true;
            if ($my->id && $row->self_reg && JLMS_checkCourseGID($my->id, $row->gid)) {
                //check that enrollment is available and user gid is allowed
                if ($row->paid) {
                    if ($view_type != 'inWL') {
                        $toolbar[] = array('btn_type' => 'yes', 'btn_str' => _JLMS_SUBSCRIBE, 'btn_js' => "javascript:submitbutton('subscription','');");
                    }
                } else {
                    if ($view_type != 'inWL') {
                        $toolbar[] = array('btn_type' => 'yes', 'btn_str' => _JLMS_SUBSCRIBE, 'btn_js' => "javascript:submitbutton('course_subscribe','');");
                    }
                }
                if ($view_type != 'inWL') {
                    $toolbar[] = array('btn_type' => 'cancel', 'btn_js' => sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=courses"));
                } else {
                    $toolbar[] = array('btn_type' => 'back', 'btn_js' => sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=courses"));
                }
                $hparams['toolbar_position'] = 'center';
                $html_code_before_toolbar = "\n\t\t\t\t<form action='" . sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}") . "' method='post' name='adminForm_enroll'>\n\t\t\t\t<script language='javascript' type='text/javascript'>\n\t\t\t\t\t<!--\n\n\t\t\t\t\tfunction submitbutton(pressbutton) {\n\t\t\t\t\t\tvar form = document.adminForm_enroll;";
                if ($JLMS_CONFIG->get('enableterms') && !$row->paid) {
                    $html_code_before_toolbar .= "\n\t\t\t\t\t\tif( (pressbutton == 'course_subscribe') && (document.getElementById('jlms_agreement').checked == false) ){\n\t\t\t\t\t\t\talert( '" . addslashes(_JLMS_AGREEMENT) . "' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tform.task.value = pressbutton;\n\t\t\t\t\t\t\tform.submit();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t";
                } else {
                    $html_code_before_toolbar .= "\n\t\t\t\t\t\t\tform.task.value = pressbutton;\n\t\t\t\t\t\t\tform.submit();\n\t\t\t\t\t";
                }
                $html_code_before_toolbar .= "\n\t\t\t\t\t\t\t}\n\t\t\t\t\t//-->\n\t\t\t\t\t</script>\n\t\t\t\t\t";
                if ($JLMS_CONFIG->get('enableterms') && !$row->paid) {
                    $html_code_before_toolbar .= "\n\t\t\t\t\t<table align='center' class='jlms_table_no_borders'><tr><td width='20'>\n\t\t\t\t\t\t<input type='checkbox' name='agreement' id='jlms_agreement' />\n\t\t\t\t\t</td><td style='text-align:left'>\n\t\t\t\t\t\t<label for='jlms_agreement'>" . $JLMS_CONFIG->get('jlms_terms') . "</label>\n\t\t\t\t\t</td></tr></table>\n\t\t\t\t\t";
                }
                if ($row->paid) {
                    $html_code_before_toolbar .= "\n\t\t\t\t\t\t<input type='hidden' name='option' value='" . $option . "' />\n\t\t\t\t\t\t<input type='hidden' name='Itemid' value='" . $Itemid . "' />\n\t\t\t\t\t\t<input type='hidden' name='task' value='subscription' />\n\t\t\t\t\t\t<input type='hidden' name='cid[]' value='" . $row->id . "' />\n\t\t\t\t\t\t<input type='hidden' name='state' value='0' />\n\t\t\t\t\t\t</form>\n\t\t\t\t\t";
                } else {
                    $html_code_before_toolbar .= "\n\t\t\t\t\t\t<input type='hidden' name='option' value='" . $option . "' />\n\t\t\t\t\t\t<input type='hidden' name='Itemid' value='" . $Itemid . "' />\n\t\t\t\t\t\t<input type='hidden' name='task' value='courses' />\n\t\t\t\t\t\t<input type='hidden' name='id' value='" . $row->id . "' />\n\t\t\t\t\t\t<input type='hidden' name='state' value='0' />\n\t\t\t\t\t\t</form>\n\t\t\t\t\t";
                }
                $hparams['html_code_before_toolbar'] = $html_code_before_toolbar;
            } else {
                $toolbar[] = array('btn_type' => 'back', 'btn_js' => sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=courses"));
            }
        } elseif ($view_type == 'future_course') {
            $hparams['simple_menu'] = true;
            if ($row->publish_start) {
                $hparams['sys_msg'] = str_replace('{date}', JLMS_dateToDisplay($row->start_date), _JLMS_COURSE_IS_PENDING_MSG);
            } else {
//.........这里部分代码省略.........
开发者ID:parkmi,项目名称:dolschool14,代码行数:101,代码来源:joomla_lms.courses.html.php

示例13: modoutput_feed

 public static function modoutput_feed(&$module, &$params, $moduleclass_sfx)
 {
     global $mosConfig_absolute_path, $mosConfig_cachepath;
     // check if cache directory is writeable
     $cacheDir = $mosConfig_cachepath . '/';
     if (!is_writable($cacheDir)) {
         $module->content = 'Cache Directory Unwriteable';
         return;
     }
     $rssurl = $params->get('rssurl');
     $rssitems = $params->get('rssitems', 5);
     $rssdesc = $params->get('rssdesc', 1);
     $rssimage = $params->get('rssimage', 1);
     $rssitemdesc = $params->get('rssitemdesc', 1);
     $words = $params->def('word_count', 0);
     $rsstitle = $params->get('rsstitle', 1);
     $rsscache = $params->get('rsscache', 3600);
     $contentBuffer = '';
     $LitePath = $mosConfig_absolute_path . '/includes/Cache/Lite.php';
     require_once $mosConfig_absolute_path . '/includes/domit/xml_domit_rss.php';
     $rssDoc = new xml_domit_rss_document();
     $rssDoc->setRSSTimeout(2);
     $rssDoc->useCacheLite(true, $LitePath, $cacheDir, $rsscache);
     $success = $rssDoc->loadRSS($rssurl);
     if ($success) {
         $content_buffer = '';
         $totalChannels = $rssDoc->getChannelCount();
         for ($i = 0; $i < $totalChannels; $i++) {
             $currChannel =& $rssDoc->getChannel($i);
             $elements = $currChannel->getElementList();
             $iUrl = 0;
             foreach ($elements as $element) {
                 //image handling
                 if ($element == 'image') {
                     $image =& $currChannel->getElement(DOMIT_RSS_ELEMENT_IMAGE);
                     $iUrl = $image->getUrl();
                     $iTitle = $image->getTitle();
                 }
             }
             // feed title
             $content_buffer = '<table cellpadding="0" cellspacing="0" class="moduletable' . $moduleclass_sfx . '">' . "\n";
             if ($currChannel->getTitle() && $rsstitle) {
                 $feed_title = $currChannel->getTitle();
                 $feed_title = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_title);
                 $content_buffer .= "<tr>\n";
                 $content_buffer .= "\t<td>\n";
                 $content_buffer .= "\t\t<strong>\n";
                 $content_buffer .= "\t\t<a href=\"" . ampReplace($currChannel->getLink()) . "\" target=\"_blank\">\n";
                 $content_buffer .= $feed_title . "</a>\n";
                 $content_buffer .= "\t\t</strong>\n";
                 $content_buffer .= "\t</td>\n";
                 $content_buffer .= "</tr>\n";
             }
             // feed description
             if ($rssdesc) {
                 $feed_descrip = $currChannel->getDescription();
                 $feed_descrip = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_descrip);
                 $content_buffer .= "<tr>\n";
                 $content_buffer .= "\t<td>\n";
                 $content_buffer .= $feed_descrip;
                 $content_buffer .= "\t</td>\n";
                 $content_buffer .= "</tr>\n";
             }
             // feed image
             if ($rssimage && $iUrl) {
                 $content_buffer .= "<tr>\n";
                 $content_buffer .= "\t<td align=\"center\">\n";
                 $content_buffer .= "\t\t<image src=\"" . $iUrl . "\" alt=\"" . @$iTitle . "\"/>\n";
                 $content_buffer .= "\t</td>\n";
                 $content_buffer .= "</tr>\n";
             }
             $actualItems = $currChannel->getItemCount();
             $setItems = $rssitems;
             if ($setItems > $actualItems) {
                 $totalItems = $actualItems;
             } else {
                 $totalItems = $setItems;
             }
             $content_buffer .= "<tr>\n";
             $content_buffer .= "\t<td>\n";
             $content_buffer .= "\t\t<ul class=\"newsfeed" . $moduleclass_sfx . "\">\n";
             for ($j = 0; $j < $totalItems; $j++) {
                 $currItem =& $currChannel->getItem($j);
                 // item title
                 $item_title = $currItem->getTitle();
                 $item_title = mosCommonHTML::newsfeedEncoding($rssDoc, $item_title);
                 // START fix for RSS enclosure tag url not showing
                 $content_buffer .= "<li class=\"newsfeed" . $moduleclass_sfx . "\">\n";
                 $content_buffer .= "\t<strong>\n";
                 if ($currItem->getLink()) {
                     $content_buffer .= "        <a href=\"" . ampReplace($currItem->getLink()) . "\" target=\"_blank\">\n";
                     $content_buffer .= "      " . $item_title . "</a>\n";
                 } else {
                     if ($currItem->getEnclosure()) {
                         $enclosure = $currItem->getEnclosure();
                         $eUrl = $enclosure->getUrl();
                         $content_buffer .= "        <a href=\"" . ampReplace($eUrl) . "\" target=\"_blank\">\n";
                         $content_buffer .= "      " . $item_title . "</a>\n";
                     } else {
                         if ($currItem->getEnclosure() && $currItem->getLink()) {
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:101,代码来源:frontend.html.php

示例14: showCourseLPath


//.........这里部分代码省略.........
" title="<?php 
                echo _JLMS_LPATH_LINK_ADDSTEP_TITLE;
                ?>
"><img class="JLMS_png" src="<?php 
                echo $JLMS_CONFIG->get('live_site');
                ?>
/components/com_joomla_lms/lms_images/toolbar/btn_add.png" width="16" height="16" border="0" alt="<?php 
                echo _JLMS_LPATH_LINK_ADDSTEP_TITLE;
                ?>
" title="<?php 
                echo _JLMS_LPATH_LINK_ADDSTEP_TITLE;
                ?>
" /></a>
					<?php 
            } else {
                echo '&nbsp;';
            }
            ?>
				</td>
				<td valign="middle" style="vertical-align:middle ">
					<?php 
            $cond_link = sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=lpath_step_cond&amp;course_id={$course_id}&amp;lpath_id={$lpath_id}&amp;id={$row_path->id}");
            $cond_descr = _JLMS_LPATH_FLWINDOW_NOCOND;
            $cond_title = _JLMS_LPATH_TITLE_FLWINDOW;
            $cond_img = 'btn_warning';
            if ($row_path->is_condition) {
                $cond_img = 'btn_cond_present';
                $y = 0;
                $is_cond_descr = false;
                $cond_descr = '<table cellpadding=0 cellspacing=0 border=0>';
                while ($y < count($conds)) {
                    if ($conds[$y]->step_id == $row_path->id) {
                        $ref_name = '';
                        $u = 0;
                        while ($u < count($lpath)) {
                            if ($lpath[$u]->id == $conds[$y]->ref_step) {
                                $ref_name = $lpath[$u]->step_name;
                                break;
                            }
                            $u++;
                        }
                        if (isset($conds[$y]->cond_time) && $conds[$y]->cond_time) {
                            $ref_name .= ' (' . _JLMS_LPATH_CONDTYPE_SPENT . ' ' . $conds[$y]->cond_time . ' ' . _JLMS_LPATH_CONDTYPE_TIME_SPENT_MIN . ')';
                        }
                        $cond_descr .= '<tr><td>' . _JLMS_LPATH_CONDTYPE_COMPLETE_W . '&nbsp;</td><td>' . $ref_name . '</td></tr>';
                        $is_cond_descr = true;
                    }
                    $y++;
                }
                $cond_descr .= '</table>';
                if (!$is_cond_descr) {
                    $cond_descr = _JLMS_LPATH_FLWINDOW_NOCOND;
                }
            }
            $img_inside_tag = '<img class="JLMS_png" src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/toolbar/' . $cond_img . '.png" width="16" height="16" border="0" alt="cond" />';
            echo JLMS_toolTip($cond_title, JLMS_txt2overlib($cond_descr), $img_inside_tag, $cond_link);
            ?>
				</td>
				<td width="60%" valign="middle" style="vertical-align:middle; "><?php 
            echo strlen($row_path->step_shortdescription) ? $row_path->step_shortdescription : '&nbsp;';
            ?>
</td>
			</tr>
			<?php 
            $k = 3 - $k;
        }
        ?>
		</table>
			<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
			<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
			<input type="hidden" name="task" value="lpath_add_chapter" />
			<input type="hidden" name="id" value="<?php 
        echo $lpath_id;
        ?>
" />
			<input type="hidden" name="course_id" value="<?php 
        echo $course_id;
        ?>
" />
			<input type="hidden" name="row_id" value="0" />
			<input type="hidden" name="boxchecked" value="0" />
		</form>
<?php 
        JLMS_TMPL::CloseTS();
        $link_new = ampReplace(sefRelToAbs("index.php?option=" . $option . "&amp;Itemid=" . $Itemid . "&amp;task=new_lpath_chapter&amp;id=" . $lpath_id . "&amp;course_id=" . $course_id));
        $controls = array();
        //$controls[] = array('href' => $link_new, 'onclick' => "", 'title' => _JLMS_LPATH_LINK_NEW_CHAP, 'img' => 'add');
        $controls[] = array('href' => "javascript:submitbutton('add_lpath_step');", 'onclick' => "", 'title' => _JLMS_LPATH_LINK_ADDSTEP_TITLE, 'img' => 'add');
        $controls[] = array('href' => "javascript:submitbutton('lpath_item_delete');", 'onclick' => "", 'title' => _JLMS_LPATH_LINK_DEL_ITEM, 'img' => 'delete');
        $controls[] = array('href' => "javascript:submitbutton('lpath_item_edit');", 'onclick' => "", 'title' => _JLMS_LPATH_LINK_EDIT_ITEM, 'img' => 'edit');
        //$controls[] = array('href' => "spacer");
        JLMS_TMPL::ShowControlsFooter($controls, sefRelToAbs("index.php?option=" . $option . "&amp;Itemid=" . $Itemid . "&amp;task=learnpaths&amp;id=" . $course_id));
        JLMS_TMPL::CloseMT();
    }
开发者ID:parkmi,项目名称:dolschool14,代码行数:101,代码来源:joomla_lms.course_lpath.html.php

示例15: echoMyNotices

    function echoMyNotices($option, $Itemid, $my_notices)
    {
        global $Itemid, $JLMS_CONFIG;
        $link_base = 'index.php?option=com_joomla_lms&amp;Itemid=' . $Itemid;
        $link_notices = $link_base;
        $link_notices .= '&amp;task=view_all_notices';
        ?>
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php 
        echo JLMSCSS::_('jlmslist', 'jlms_homepage_list');
        ?>
" style="margin-top:0; margin-bottom:0;">
		<tr><<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" colspan="2" align="center" style="text-align:center"><?php 
        echo _JLMS_HOME_NOTICES;
        ?>
</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
></tr>
		<?php 
        $k = 1;
        foreach ($my_notices as $m_n) {
            $link = $link_base;
            if ($m_n->doc_id) {
                $link .= '&amp;task=' . $m_n->task . '&amp;course_id=' . $m_n->course_id . '&amp;id=' . $m_n->doc_id . '';
            } else {
                $link .= '&amp;task=' . $m_n->task . '&amp;id=' . $m_n->course_id . '';
            }
            ?>
		<tr class="<?php 
            echo JLMSCSS::_('sectiontableentry' . $k);
            ?>
">
			<td valign="top" width="16" style="padding-top: 5px;">
				<img class='JLMS_png' src="<?php 
            echo $JLMS_CONFIG->get('live_site') . "/components/com_joomla_lms/lms_images/toolbar/btn_notice.png";
            ?>
" width="16" height="16" border="0" alt="dropbox" />
			</td>
			<td>
				<div class="notes_head">
					on <?php 
            echo JLMS_dateToDisplay($m_n->data, false, 0, " H:m:s");
            ?>
				</div>
				<div class="clr"></div>
				<div class="notes_foot">
					<?php 
            if (!$m_n->course_id && !$m_n->doc_id) {
                if (strlen($m_n->notice) > 100) {
                    echo substr($m_n->notice, 0, 100) . ' ...';
                } else {
                    echo substr($m_n->notice, 0, 100);
                }
            } else {
                ?>
						<a href="<?php 
                echo ampReplace(sefRelToAbs($link));
                ?>
" title="<?php 
                echo substr($m_n->notice, 0, 30);
                ?>
">
						<?php 
                if (strlen($m_n->notice) > 100) {
                    echo substr($m_n->notice, 0, 100) . ' ...';
                } else {
                    echo substr($m_n->notice, 0, 100);
                }
                ?>
						</a>
						<?php 
            }
            ?>
				</div>
			</td>
		</tr>
		<?php 
            $k = 3 - $k;
        }
        ?>
		<tr>
			<td colspan="2" align="right" class="<?php 
        echo JLMSCSS::_('jlmslist-footer_td');
        ?>
">
				<a href="<?php 
        echo sefRelToAbs($link_notices);
        ?>
" title="view all notices" style="font-size: 9px;">
					view all notes
				</a>
			</td>
		</tr>
		</table>
//.........这里部分代码省略.........
开发者ID:parkmi,项目名称:dolschool14,代码行数:101,代码来源:joomla_lms.html.php


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