General Statistics
390 Tutorials
202 Total Votes
16 User(s) Online
770198 Views Total
3000 Registered Members
24534 Posts Total
Rooneyfeld is our newest member
About this Tutorial: Advanced Tutorial CMS Script v1
Advanced Tutorial CMS Script v1
Rated 5 / 4 Votes

Advanced Tutorial CMS Script v1

The ultimate tutorial content management system. With built in self installer and administration panel, its your all in one package!


Date Added: November 21, 2005 [ 25690 Views - 4 Votes ] [ Rate ]

Author: Chaos King [ PHP Coding ] [ 27 Comment(s) ]

Advanced Tutorial CMS Script v1
Note: Check out Tutorial CMS (www.tutcms.com) for updates on the new script!


3) Now to create our friendly installer script. Create a file called install.php and CHMOD it to 777. Insert the following coding inside:

CODE

<title>Installer</title>
<?php

//Getting the file db.php which includes our database settings.  
define( 'DB_PATH'  , "./" );
require DB_PATH."db.php";

//Installing
mysql_query("
CREATE TABLE `$mysql_table` (
`id` tinyint(11) NOT NULL auto_increment,
`title` text NOT NULL,
`avatar` text NOT NULL,
`date` varchar(50) NOT NULL,
`category` varchar(25) NOT NULL default '',
`description` text NOT NULL,
`author` text NOT NULL,
`email` text NOT NULL,
`content` text NOT NULL,
`views` varchar( 30 ) NOT NULL default '0',
PRIMARY KEY (`ID`)
) TYPE=MyISAM;
")
or die('Error, something is wrong.  
Please make sure all information is correct and try again.');

echo "Install Complete!  All the tables have been installed, and you are all set!  This file has been deleted for security purposes.  If not, please delete it manually.";

//Deleting the install.php file
unlink('install.php');
?>

What that does, is include the db.php settings and runs the query into the database. If you dont want to use the installer, feel free to run the query below in your favorite mysql manager such as phpmyadmin
CODE

CREATE TABLE `tutorials` (
`id` tinyint(11) NOT NULL auto_increment,
`title` text NOT NULL,
`avatar` text NOT NULL,
`date` varchar(50) NOT NULL,
`category` varchar(25) NOT NULL default '',
`description` text NOT NULL,
`author` text NOT NULL,
`email` text NOT NULL,
`content` text NOT NULL,
`views` varchar( 30 ) NOT NULL default '0',
PRIMARY KEY (`ID`)
) TYPE=MyISAM;



Total Pages (5)
<<Prev 1 2 [3] 4 5 Next>>

Welcome User
Welcome Guest
( Login | Register )

Latest Tutorial Index - RSS Feed
Latest Resources - RSS Feed
Latest Tutorials - RSS Feed
Vote for Us
  • VixxIMG.com - Free Image Hosting, Free Myspace Image Hosting, Free Image Uploads
  • PageRank Plus - Google PageRank checking, with a twist.
Random Affilaites