⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fcktemplates.xml.php

📁 完美的在线教育系统
💻 PHP
📖 第 1 页 / 共 3 页
字号:
<?php header('Content-Type: text/xml; charset=utf-8');$language_file = 'document';require_once('../../global.inc.php');echo '<?xml version="1.0" encoding="utf-8" ?>';$IMConfig['base_url'] = $_configuration['root_web'].'main/img/gallery/';function loadCSS($css_name){	$template_css = ' <style type="text/css">'.str_replace('../../img/',api_get_path(REL_CODE_PATH).'img/',file_get_contents(api_get_path(SYS_PATH).'main/css/'.$css_name.'/default.css')).'</style>';	$template_css = str_replace('images/',api_get_path(REL_CODE_PATH).'css/'.$css_name.'/images/',$template_css);	return $template_css;}/** * Transforms a language variable into XML-usable code */function s($var){	global $charset;    $search = array('&','<','>');    $replace = array ('&amp;','&amp;lt;','&amp;gt;');    return str_replace($search,$replace,mb_convert_encoding(get_lang($var),'UTF-8',$charset));}/** * Transforms a string into XML-usable code */function s2($var){	global $charset;    $search = array('&','<','>');    $replace = array ('&amp;','&amp;lt;','&amp;gt;');    return str_replace($search,$replace,mb_convert_encoding($var,'UTF-8',$charset));}$css = loadCSS(api_get_setting('stylesheets'));$img_dir = api_get_path(REL_CODE_PATH).'img/';$default_course_dir = api_get_path(REL_CODE_PATH).'default_course_document/';//<Templates imagesBasePath="fck_template/images/">?><Templates imagesBasePath="">	<?php	//Get all personnal templates in the database 		$table_template = Database::get_main_table(TABLE_MAIN_TEMPLATES);		$sql = 'SELECT id, title, description, ref_doc FROM '.$table_template.' WHERE course_code="'.api_get_course_id().'" AND user_id="'.api_get_user_id().'"';		$result_template = api_sql_query($sql,__FILE__,__LINE__);	 	$course = api_get_course_info();	$table_document = Database::get_course_table(TABLE_DOCUMENT, $_course['dbName']);		while($a_template = Database::fetch_array($result_template))	{		$document_id = $a_template['ref_doc'];						$sql_document_path = 'SELECT path FROM '.$table_document.' WHERE id="'.$document_id.'"';				$result_document_path = api_sql_query($sql_document_path,__FILE__,__LINE__);		$document_path = Database::result($result_document_path,0,0);		/*				$width = 100;		$height = 90;				$im = @ImageCreate($width, $height);		$bg_color = ImageColorAllocate($im, 255, 255, 255);		$ttfont   = api_get_path(LIBRARY_PATH).'fckeditor/FreeSans.ttf';		$text_color = ImageColorAllocate($im, 0, 0, 0);				$a_text=explode(' ',$a_template['title']);		$y=25;		foreach ($a_text as $a_part_of_title) 		{			imagettftext($im, 10, 0, 10, $y, $text_color, $ttfont, $a_part_of_title);			$y+=20;		}				imagejpeg($im, api_get_path(SYS_CODE_PATH).'upload/template_thumbnails/'.$a_template['id'].'.jpg');		*/		//echo '<Template title="'.htmlentities($a_template['title']).'" image="'.api_get_path(REL_CODE_PATH).'upload/template_thumbnails/'.$a_template['id'].'.jpg">';		echo '<Template title="'.s2($a_template['title']).'" >';			echo '<Description>'.s2($a_template['description']).'</Description>';			echo '<Html>';		 				echo htmlentities(file_get_contents(api_get_path(SYS_COURSE_PATH).$course['path'].'/document'.$document_path));						echo '</Html>';		echo '</Template>';				}	?>    <Template title="<?php echo s('TemplateTitleCourseTitle'); ?>" >    <Description><?php echo s('TemplateTitleCourseTitleDescription'); ?></Description>    <Html>        <![CDATA[           	<head>            	<?php echo $css ?>            	<style type="text/css">            	.gris_title            	{            		color: silver;            	}            	            	h1            	{            		text-align: right;            	}				</style>              </head>            <body>			<table style="background: transparent url(<?php echo $img_dir.'faded_blue_horizontal.png'; ?>) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">			<tbody>			<tr>						<td style="vertical-align: middle; width: 50%;" colspan="1" rowspan="1">				<h1>TITULUS 1<br>				<span class="gris_title">TITULUS 2</span><br>				</h1>			</td>						<td style="width: 50%;">				<img style="width: 100px; height: 100px;" alt="dokeos logo" src="<?php echo $default_course_dir.'images/logo_dokeos.png';?>"></td>			</tr>			</tbody>			</table>			<p><br>			<br>			</p>			</body>        ]]>    </Html></Template>     	<Template title="<?php echo s('TemplateTitleCheckList'); ?>" >	<Description><?php echo s('TemplateTitleCheckListDescription'); ?></Description>	<Html>	    <![CDATA[	            <head>	               <?php echo $css ?>	              	            </head>	            <body>				<table style="background: transparent url(<?php echo $img_dir.'faded_blue_horizontal.png'; ?>) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">				<tbody>				<tr>				<td style="vertical-align: top; width: 66%;">										<h3>Lorem ipsum dolor sit amet</h3>				<ul>					<li>consectetur adipisicing elit</li>					<li>sed do eiusmod tempor incididunt</li>					<li>ut labore et dolore magna aliqua</li>				</ul>								<h3>Ut enim ad minim veniam</h3>											<ul>					<li>quis nostrud exercitation ullamco</li>					<li>laboris nisi ut aliquip ex ea commodo consequat</li>					<li>Excepteur sint occaecat cupidatat non proident</li>				</ul>								<h3>Sed ut perspiciatis unde omnis</h3>								<ul>					<li>iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam</li>					<li>eaque ipsa quae ab illo inventore veritatis</li>					<li>et quasi architecto beatae vitae dicta sunt explicabo.&nbsp;</li>				</ul>								</td>				<td style="background: transparent url(<?php echo $img_dir.'postit.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 33%; text-align: center; vertical-align: bottom;">				<h3>Ut enim ad minima</h3>				Veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur.<br>				<h3>				<img style="width: 180px; height: 144px;" alt="trainer" src="<?php echo $default_course_dir.'images/trainer/trainer_smile.png';?>"><br></h3>				</td>				</tr>				</tbody>				</table>				<p><br>				<br>				</p>				</body>	    ]]>	</Html>	</Template>    <Template title="<?php echo s('TemplateTitleTeacher'); ?>" >	<Description><?php echo s('TemplateTitleTeacherDescription'); ?></Description>	<Html>		<![CDATA[				<head>                   <?php echo $css ?>                   <style type="text/css">	            	            	.text	            	{	            		            		font-weight: normal;	            	}					</style>                </head>                                    <body>					<table style="background: transparent url(<?php echo $img_dir.'faded_blue_horizontal.png'; ?>) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">					<tbody>					<tr>					<td></td>					<td style="height: 33%;"></td>					<td></td>					</tr>					<tr>					<td style="width: 25%;"></td>					<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right; font-weight: bold;" colspan="1" rowspan="1">					<span class="text">					<br>					Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis pellentesque.</span>					</td>					<td style="width: 25%; font-weight: bold;">					<img style="width: 180px; height: 241px;" alt="trainer" src="<?php echo $default_course_dir.'images/trainer/trainer_case.png';?>"></td>					</tr>					</tbody>					</table>					<p><br>					<br>					</p>				</body>				    		]]>	</Html></Template>     	<Template title="<?php echo s('TemplateTitleLeftList'); ?>" >	<Description><?php echo s('TemplateTitleListLeftListDescription'); ?></Description>	<Html>	<![CDATA[			<head>	           <?php echo $css ?>	       </head>		    		    <body>				<table style="background: transparent url(<?php echo $img_dir.'faded_blue_horizontal.png'; ?>) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">				<tbody>				<tr>				<td style="width: 66%;"></td>				<td style="vertical-align: bottom; width: 33%;" colspan="1" rowspan="4">&nbsp;<img style="width: 180px; height: 248px;" alt="trainer" src="<?php echo $default_course_dir.'images/trainer/trainer_reads.png';?>"><br>				</td>				</tr>				<tr align="right">				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">Lorem				ipsum dolor sit amet.				</td>				</tr>				<tr align="right">				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">				Vivamus				a quam.&nbsp;<br>				</td>				</tr>				<tr align="right">				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">				Proin				a est stibulum ante ipsum.</td>				</tr>				</tbody>				</table>			<p><br>			<br>			</p>			</body> 		 		    	]]>	</Html>	</Template>		<Template title="<?php echo s('TemplateTitleLeftRightList'); ?>" >	<Description><?php echo s('TemplateTitleLeftRightListDescription'); ?></Description>	<Html>	<![CDATA[			<head>	           <?php echo $css ?>		    </head>			<body>				<table style="background: transparent url(<?php echo $img_dir.'faded_blue_horizontal.png'; ?>) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; height: 400px; width: 720px;" border="0" cellpadding="15" cellspacing="6">				<tbody>				<tr>				<td></td>				<td style="vertical-align: top;" colspan="1" rowspan="4">&nbsp;<img style="width: 180px; height: 294px;" alt="Trainer" src="<?php echo $default_course_dir.'images/trainer/trainer_join_hands.png';?>"><br>				</td>				<td></td>				</tr>				<tr>				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right;">Lorem				ipsum dolor sit amet.				</td>				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: left;">				Convallis				ut.&nbsp;Cras dui magna.</td>				</tr>				<tr>				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right;">				Vivamus				a quam.&nbsp;<br>				</td>				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: left;">				Etiam				lacinia stibulum ante.<br>				</td>				</tr>				<tr>				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right;">				Proin				a est stibulum ante ipsum.</td>				<td style="background: transparent url(<?php echo $img_dir.'faded_grey.png'; ?>) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: left;">				Consectetuer				adipiscing elit. <br>				</td>				</tr>				</tbody>				</table>			<p><br>			<br>			</p>			</body> 		    	]]>	</Html>	</Template>		<Template title="<?php echo s('TemplateTitleRightList'); ?>" >	<Description><?php echo s('TemplateTitleRightListDescription'); ?></Description>	<Html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -