Вход Регистрация
Файл: mc-master/docs/dev.general_functions.html
Строк: 132
<?php
<html>
    <!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
html xmlns="http://www.w3.org/1999/xhtml">
        <
head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <
title>Документация по MobileCMS</title>
            <
link rel="stylesheet" href="style.css" type="text/css" />
        </
head>

        <
body><div class="navheader">
                <
table width="100%" summary="Navigation header">
                    <
tr>
                        <
th align="center">Документация по MobileCMS</th>
                    </
tr>
                    <
tr>
                        <
th align="center">Главные методы ядра</th>
                    </
tr>
                </
table>
                <
hr />
            </
div>

            <
div class="refsect1">
                <
h2>Описание</h2>
                <
class="classname">
                    
Главные методы ядра находятся в файле <strong class="command">kernel/general_functions.php</strong>
                </
p>
            </
div>

            <
div class="refsect1">
                <
h2>Список основных функций</h2>
                <
dl>
                    <
dt>
                        <
span class="term">a_import(string file)</span>
                    </
dt>
                    <
dd>
                        <
p>Предназначена для упрощенного подключения php файлов <strong class="command">$file</strongи вывода ошибки в случае неудачиУказывать ".php"  не обязательно.</p>
                        <
div class="programlisting" style="margin-left: 0px;">
                            
a_import('libraries/mysql');
                        </
div>
                    </
dd>
                    <
dt>
                        <
span class="term">a_url(string path, [string query [, bool header]])</span>
                    </
dt>
                    <
dd>
                        <
p>Предназначенна для упрощения генерации внутренней ссылки.</p>
                        <
ul>
                            <
li><strong class="command">$path</strong> - путь к странице</li>
                            <
li><strong class="command">$query</strong> - GET запроc (не обязательно)</li>
                            <
li><strong class="command">$header</strong> - указывает используется ли ссылка в заголовке или нет (не обязательный параметр)</li>
                        </
ul>
                        <
div class="programlisting" style="margin-left: 0px;">
                            
a_url('guestbook/message_delete''message_id=1');
                        </
div>
                    </
dd>
                    <
dt>
                        <
span class="term">a_error([string error_message [, bool fatal_error]])</span>
                    </
dt>
                    <
dd>
                        <
p>Служит для вывода сообщения об ошибке <strong class="command">$error_message</span>, по умолчанию завершает работу системы</p>
                        <
div class="programlisting" style="margin-left: 0px;">
                            
a_error("Сообщение не найдено!");
                        </
div>
                    </
dd>
                    <
dt>
                        <
span class="term">a_notice(string messagestring link [, int timeout])</span>
                    </
dt>
                    <
dd>
                        <
p>Служит для вывода информационного сообщения <strong class="command">$message</spanи перенаправления пользователя по ссылке <strong class="command">$link</span>, не обязательный параметр <strong class="command">$timeout</spanуказывает на задержку в секундах для перенаправления</p>
                                        <
div class="programlisting" style="margin-left: 0px;">
                                            
a_notice("Сообщение удалено!"a_url('guestbook'));
                                        </
div>
                                        </
dd>
                                        <
dt>
                                            <
span class="term">a_confirm(string messagestring link_ok string link_cancel)</span>
                                        </
dt>
                                        <
dd>
                                            <
p>Служит для вывода подтверждения для выполнения определенного действия</p>
                                            <
ul>
                                                <
li><strong class="command">$message</strong> - сообщение для подтверждения</li>
                                                <
li><strong class="command">$link_ok</strong> - ссылка для подтверждения</li>
                                                <
li><strong class="command">$link_cancel</strong> - ссылка для отмены</li>
                                            </
ul>
                                            <
div class="programlisting" style="margin-left: 0px;">
                                                
$message "Подтверждаете удаление данного сообщения?";<br />
                                                
$link_ok a_url('guestbook/message_delete''message_id=1');<br />
                                                
$link_cancel a_url('questbook');<br />
                                                <
br />
                                                
a_confirm($message$link_ok$link_cancel);
                                            </
div>
                                        </
dd>
                                        <
dt>
                                            <
span class="term">a_safe(string str)</span>
                                        </
dt>
                                        <
dd>
                                            <
p>Служит для обработки строки <strong class="command">$str</strongперед помещением ее в базу данных.</p>
                                        </
dd>
                                        <
dt>
                                            <
span class="term">a_debug(mixed var)</span>
                                        </
dt>
                                        <
dd>
                                            <
p>Служит для вывода дампа переменной <strong class="command">$var</strong></p>
                                        </
dd>
                                        </
dl>
                                        </
div>

                                        <
div><br /><br /></div>

                                        <
div class="navfooter"><hr />
                                            <
table width="100%" summary="Navigation footer">
                                                <
tr>
                                                    <
td width="40%" align="left"><a href="dev.files.html">Пред</a></td>
                                                    <
td width="20%" align="center"><a href="index.html">На уровень выше</a></td>
                                                    <
td width="40%" align="right"><a href="dev.module_main.html">След</a></td>
                                                </
tr>
                                                <
tr>
                                                    <
td width="40%" align="left" valign="top">Дерево каталогов</td>
                                                    <
td width="20%" align="center">Содержание</td>
                                                    <
td width="40%" align="right" valign="top">Методы модуля main</td>
                                                </
tr>
                                            </
table>
                                        </
div>

                                        </
body>
                                        </
html>
?>
Онлайн: 0
Реклама