Configure the new TinyMCE to have almost the same buttons as the old one.
Configure the new TinyMCE to have almost the same buttons as the old one.

File last commit:

f1e0050abc35
3cf3f8fd35f8
Show More
pages.php
53 lines | 2.0 KiB | text/x-php | PhpLexer
Add most necessary files for admin interface.
r1 <?php
class Page {
var $url_name, $status, $title, $body, $style;
}
function savepage($page) {
if($page->url_name)
return updatepage($page);
else
return insertpage($page);
}
function insertpage($page) {
global $mtdb;
$sql = 'INSERT INTO static_page ( url_name, status, title, body, style ) VALUES ('
Update include/*.php to use mysqli_* functions.
r4 . ' "' . mysqli_real_escape_string($mtdb->link, $page->url_name)
. '", "' . mysqli_real_escape_string($mtdb->link, $page->status)
. '", "' . mysqli_real_escape_string( $mtdb->link, trim( $page->title ) )
. '", "' . mysqli_real_escape_string( $mtdb->link, trim( $page->body ) )
. '", "' . mysqli_real_escape_string( $mtdb->link, trim( $page->style ) )
Add most necessary files for admin interface.
r1 . '")';
adminlog("Page '".$page->url_name."' has been added.", MTS_PAGE, MTA_ADD);
return $mtdb->query($sql);
Update include/*.php to use mysqli_* functions.
r4 }
Add most necessary files for admin interface.
r1
function updatepage($page) {
if ( !$page->url_name ) return false;
global $mtdb;
Update include/*.php to use mysqli_* functions.
r4
Fix a handful of typos in include/pages.php.
r6 $sql = 'UPDATE static_page SET url_name = "' . mysqli_real_escape_string($mtdb->link, $page->url_name)
Update include/*.php to use mysqli_* functions.
r4 . '", status = "' . mysqli_real_escape_string($mtdb->link, $page->status)
Fix a handful of typos in include/pages.php.
r6 . '", title = "' . mysqli_real_escape_string( $mtdb->link, trim( $page->title ) )
. '", body = "' . mysqli_real_escape_string( $mtdb->link, trim( $page->body ) )
. '", style = "' . mysqli_real_escape_string( $mtdb->link, trim( $page->style ) )
Update include/*.php to use mysqli_* functions.
r4 . '" WHERE url_name = "' . mysqli_real_escape_string($mtdb->link, $page->url_name) . '"';
Add most necessary files for admin interface.
r1 adminlog("Page '".$page->url_name."' has been updated.", MTS_PAGE, MTA_MODIFY);
return $mtdb->query( $sql );
}
function deletepage($url_name) {
if ( !$url_name ) return false;
global $mtdb;
adminlog("Page '".$page->url_name."' has been deleted.", MTS_PAGE, MTA_DELETE);
Update include/*.php to use mysqli_* functions.
r4 return $mtdb->query( 'DELETE FROM static_page WHERE url_name = "' . mysqli_real_escape_string($mtdb->link, $url_name) . '"' );
Add most necessary files for admin interface.
r1 }
function getpage($url_name) {
global $mtdb;
Update include/*.php to use mysqli_* functions.
r4 return $mtdb->getRow( 'SELECT url_name, status, title, body, style FROM static_page WHERE url_name = "'. mysqli_real_escape_string($mtdb->link, $url_name) . '"' );
Add most necessary files for admin interface.
r1 }
?>