Вернуться   Форум SAPE.RU > Система SAPE.ru > Установка кода на различные движки

-->
Ответ
 
Опции темы
Старый 18.04.2012, 14:58   #1
Новичок
 
Регистрация: 19.06.2007
Сообщений: 5
Вес репутации: 0
zaleha на пути к лучшему
По умолчанию Установка кода на paFileDB

Ни на форуме ни в инете нет описание как добавить код в этот движок.

Главная страница index.php
В папке templates есть файлы footer.tpl и main.tpl
При вставление кода в footer.tpl естественно ничего не работает.

Файл index.php

Код:
<?php

/**
  * paFileDB 3.5
  *
  * This is the master file for paFileDB. This is the only
  * page at this time that is designed to be run straight
  * from the browser.
  *
  * Author: Todd <http://www.phparena.net>
  * Version 3.5.3
  * Copyright 2005 PHP Arena
  */

if (file_exists('install')) { die("Please remove the install directory to use paFileDB!"); }
if (file_exists('upgrade')) { die("Please remove the upgrade directory to use paFileDB!"); }

//Start the execution timer
$starttime = microtime();	
$starttime = explode(" ",$starttime);
$starttime = $starttime[1] + $starttime[0];


//Require the important files so paFileDB isn't paUselessScript
require('./includes/smarty/Smarty.class.php');
require('./includes/functions.php');
require('./includes/db/mysql.php');

/*Get $act from the query string, set to main if $act is unset 
 (only time its unset is on the main page */
if (!isset($_GET['act'])) { $act = 'main'; } else { $act = $_GET['act']; }


//Load paFileDB settings into $settings array
$settings = $db->fetch(array(), 'settings');
$version = '3.5.3';

//This stops any l33t h4x0ring of paFileDB. Just an extra security measure
$allowed_acts = array('main', 'category', 'view', 'download', 'viewall', 'search', 'email', 'license', 'mirror', 'report');
if (!in_array($act, $allowed_acts))
{
    die("Invalid Action!");
}

//Get Smarty set up and load the right language file
$smarty = new Smarty();
$smarty->config_booleanize = false;
init_smarty($settings[0]['skin']);
$smarty->config_load('english.conf');
if ($settings[0]['lang'] != "english") { $smarty->config_load($settings[0]['lang'].'.conf'); }
$smarty->config_load('config.conf');
$smarty->assign('settings', $settings[0]);
$smarty->assign('act');
$smarty->assign('version', $version);
require('./includes/admin/auth.php');

//Require the file that actually does what we want
require('./includes/'.$act.'.php');

//Display the header
$smarty->display('header.tpl');

//Display the template for whatever page we're showing
$smarty->display($act.'.tpl');

//Calculate execution time
$endtime = microtime();
$endtime = explode(" ",$endtime);
$endtime = $endtime[1] + $endtime[0];
$stime = $endtime - $starttime;

dropDown($settings[0]['dropdown']);
//Send exec time and queries used to Smarty
$smarty->assign('debug_info', array(count($db->queries), round($stime,5)));

$smarty->display('footer.tpl');

//Display the footer

?>
Файл footer.tpl

Код:
<table width="75%" align="center" cellpadding="3" cellspacing="0" border="0">
  <tr>
    <td align="right">
      {$drop}
    </td>
  </tr>
</table>

<!--End content, begin footer-->
{if $settings.stats}<div align="center">{$debug_info.0} Queries Used<br />{$debug_info.1} Seconds to execute</div>{/if}
<div align="center">
	<table border="1" width="47%" id="table1" height="31%">
		<tr>
			<td>
			<p align="center">
тут блок ссылок

</td>
		</tr>
	</table>
</div>
<p />
<br>
<br>
<noindex>
<center>
тут счётчики
</center>
</noindex>
<div align="center">тут копирайт</a><br />
</div>
</body>
</html>
Файл main.tpl

Код:
<table width="75%" border="1" align="center" cellpadding="3" cellspacing="0" class="border">
  <tr class="sectionheader">
    <td width="85%">{#category#}</td>
    <td width="15%">{#files#}</td>
  </tr>


{foreach key=row item=cat from=$categories}
  <tr class="{cycle values=row1,row2}">
    <td width="85%">
      <a href="{$settings.dburl}/index.php?act=category&amp;id={$cat.cat_id}">{$cat.cat_name}</a><br />
      <span class="small">{$cat.cat_desc}</span>
    </td>
    <td width="15%" align="center">{$cat.cat_files}</td>
  </tr>
{/foreach}
{if $settings.viewall == 1}
  <tr class="row1">
    <td width="100%" colspan="2">
      <a href="{$settings.dburl}/index.php?act=viewall">{#viewallfiles#}</a>
    </td>
  </tr>
{/if}
</table>
<p>&nbsp;</p>
<table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td align="right">
{#all_times_are#} {$settings.timezone}
</td></tr>
</table>
Может поможет кто-то.
zaleha вне форума   Ответить с цитированием
Старый 18.04.2012, 15:22   #2
Добрый модератор
 
Аватар для zhegloff
 
Регистрация: 09.07.2007
Адрес: глобус Украины
Сообщений: 27,600
Вес репутации: 1030
zhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущееzhegloff - прекрасное будущее
По умолчанию

Подпись, вторая строка.
__________________
Установка кода сапы от $9.95. Пишите в личку.
Правильный хостинг.
В личке бесплатно не отвечаю обычно.
zhegloff вне форума   Ответить с цитированием
Старый 18.04.2012, 15:33   #3
Новичок
 
Регистрация: 19.06.2007
Сообщений: 5
Вес репутации: 0
zaleha на пути к лучшему
По умолчанию

Написал в личку.
zaleha вне форума   Ответить с цитированием
Ответ


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Установка кода на SMF Hikari Установка кода на различные движки 8 22.08.2012 21:06
Нужна помощь с установкой кода на paFileDB Bewitched Установка кода на различные движки 4 03.02.2012 15:57
Установка кода? Bismuth Установка кода на различные движки 3 29.11.2009 13:52
Установка кода на ASP ladymystery Установка кода на различные движки 2 28.10.2009 11:35
Установка кода Sape на голый HTML. Вылазит часть кода barushk Вопросы от новичков 5 07.04.2009 08:14


Часовой пояс GMT +3, время: 04:40.