Changeset 468 for trunk/lib/TemplateGlue.inc.php
- Timestamp:
- Feb 20, 2014 3:03:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/branches/eli_branch merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/lib/TemplateGlue.inc.php
r407 r468 4 4 * For details visit the project site: <http://trac.strangecode.com/codebase/> 5 5 * Copyright 2001-2012 Strangecode, LLC 6 * 6 * 7 7 * This file is part of The Strangecode Codebase. 8 8 * … … 11 11 * Free Software Foundation, either version 3 of the License, or (at your option) 12 12 * any later version. 13 * 13 * 14 14 * The Strangecode Codebase is distributed in the hope that it will be useful, but 15 15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 16 16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 17 * details. 18 * 18 * 19 19 * You should have received a copy of the GNU General Public License along with 20 20 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 24 24 * TemplateGlue.inc.php 25 25 */ 26 27 /**28 * Print URL to download file with BBEdit/Interarchy. "USER" must be a pre-set29 * environment variable. Files must reside within and be relative to env "DOCUMENT_ROOT".30 *31 * @access public32 * @param mixed $file File path relative to DOCUMENT_ROOT (i.e. '/_templates/index.ihtml').33 * @return string <a> with file basename as text.34 */35 function bbftp($file)36 {37 return sprintf('<a href="bbftp://%s@%s:%s%s" title="%s" style="text-decoration: none; border-bottom: blue 1px dotted;">%s</a>', $_SERVER['USER'], $_SERVER['HTTP_HOST'], $_SERVER['DOCUMENT_ROOT'], $file, $file, basename($file));38 }39 26 40 27 /** … … 89 76 $app =& App::getInstance(); 90 77 $db =& DB::getInstance(); 91 78 92 79 $qid = $db->query("SHOW COLUMNS FROM " . $db->escapeString($db_table) . " LIKE '" . $db->escapeString($db_col) . "'",false); 93 80 … … 95 82 if (preg_match('/^enum|^set/i', $row[1]) && preg_match_all("/'([^']*)'/", $row[1], $enum)) { 96 83 if ($sort) { 97 natsort($enum[1]); 84 natsort($enum[1]); 98 85 } 99 86 return $enum[1]; … … 329 316 { 330 317 $db =& DB::getInstance(); 331 318 332 319 // Sometimes preselected comes as a comma list. 333 320 if (!is_array($preselected)) { … … 373 360 { 374 361 $db =& DB::getInstance(); 375 362 376 363 // Sometimes preselected comes as a comma list. 377 364 if (!is_array($preselected)) { … … 501 488 } 502 489 } 503 504 ?>
Note: See TracChangeset
for help on using the changeset viewer.