<?php\r
/*\r
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
- * Copyright (C) 2002-2009 The Nucleus Group\r
+ * Copyright (C) 2002-2012 The Nucleus Group\r
*\r
* This program is free software; you can redistribute it and/or\r
* modify it under the terms of the GNU General Public License\r
* exporting Nucleus skins: SKINIMPORT and SKINEXPORT\r
*\r
* @license http://nucleuscms.org/license.txt GNU General Public License\r
- * @copyright Copyright (C) 2002-2009 The Nucleus Group\r
+ * @copyright Copyright (C) 2002-2012 The Nucleus Group\r
* @version $Id: skinie.php 1624 2012-01-09 11:36:20Z sakamocchi $\r
*/\r
\r
echo "\t" . '<skin name="' . Entity::hsc($skinName) . '" type="' . Entity::hsc($skinObj->getContentType()) . '" includeMode="' . Entity::hsc($skinObj->getIncludeMode()) . '" includePrefix="' . Entity::hsc($skinObj->getIncludePrefix()) . '">' . "\n";\r
echo "\t\t<description>" . Entity::hsc($skinObj->getDescription()) . "</description>\n";\r
\r
- $res = sql_query('SELECT stype, scontent FROM '. sql_table('skin') .' WHERE sdesc=' . $skinId);\r
- while ( $partObj = sql_fetch_object($res) )\r
+ $res = DB::getResult('SELECT stype, scontent FROM '. sql_table('skin') .' WHERE sdesc=' . $skinId);\r
+ foreach ( $res as $row )\r
{\r
- echo "\t\t" . '<part name="',Entity::hsc($partObj->stype) . '">';\r
- echo '<![CDATA[' . $this->escapeCDATA($partObj->scontent) . ']]>';\r
+ echo "\t\t" . '<part name="',Entity::hsc($row['stype']) . '">';\r
+ echo '<![CDATA[' . $this->escapeCDATA($row['scontent']) . ']]>';\r
echo "</part>\n\n";\r
}\r
echo "\t</skin>\n\n\n";\r
echo "\t" . '<template name="' . Entity::hsc($templateName) . '">' . "\n";\r
echo "\t\t<description>" . Entity::hsc(Template::getDesc($templateId)) . "</description>\n";\r
\r
- $res = sql_query('SELECT tpartname, tcontent FROM '. sql_table('template') .' WHERE tdesc=' . $templateId);\r
- while ( $partObj = sql_fetch_object($res) )\r
+ $res = DB::getResult('SELECT tpartname, tcontent FROM '. sql_table('template') .' WHERE tdesc=' . $templateId);\r
+ foreach ( $res as $row )\r
{\r
- echo "\t\t" . '<part name="' . Entity::hsc($partObj->tpartname) . '">';\r
- echo '<![CDATA[' . $this->escapeCDATA($partObj->tcontent) . ']]>';\r
+ echo "\t\t" . '<part name="' . Entity::hsc($row['tpartname']) . '">';\r
+ echo '<![CDATA[' . $this->escapeCDATA($row['tcontent']) . ']]>';\r
echo "</part>\n\n";\r
}\r
\r