This is guide mostly for website tools and code, for example CMS or registration scripts.
There can also be tools.
Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators
by lmame on Mon Aug 06, 2007 4:42 pm
In this threads are some tests.
The world is full of love and peace ^_^
-
lmame
- Admin
-
- Posts: 8997
- Joined: Mon Aug 06, 2007 4:42 pm
- Location: July City
-
by lmame on Mon Aug 06, 2007 4:53 pm
If you want to insert (and see) syntaxed colored code, use "code" bbcode:
Example for C / C++ code:
-
- [code=c]
- int main(int argc, char *argv[])
- {
- srand( (unsigned)time(NULL) );
- srand( rand()*time(NULL) );
- StartSignal( );
- }
- [/code]
-
Gives:
-
- int main(int argc, char *argv[])
- {
- srand( (unsigned)time(NULL) );
- srand( rand()*time(NULL) );
- StartSignal( );
- }
-
For PHP:
-
- [code=php]
- <?php
- /**
- * test
- *
- */
- define('DIR_AUTH', dirname(__FILE__));
- echo("this is a test");
- ?>
- [/code]
-
Gives:
The world is full of love and peace ^_^
-
lmame
- Admin
-
- Posts: 8997
- Joined: Mon Aug 06, 2007 4:42 pm
- Location: July City
-
by lmame on Tue Aug 07, 2007 11:16 pm
HTML example:
-
- [code=html]
- <html>
- <head>
- <title>Title of the webpage</title>
- </head>
- <body>
- Text of the webpage
- </body>
- </html>
- [/code]
-
Javascript example:
-
- [code=js]
- <script type="text/javascript">
- // <![CDATA[
- var jump_page = 'Enter the page number you wish to go to.:';
- var on_page = '';
- var per_page = '';
- var base_url = '';
- var style_cookie = 'phpBBstyle';
- var onload_functions = new Array();
- var onunload_functions = new Array();
-
-
- /**
- * Find a member
- */
- function find_username()
- {
- return false;
- }
-
- /**
- * New function for handling multiple calls to window.onload and window.unload by pentapenguin
- */
- window.onload = function()
- {
- for (i = 0; i <= onload_functions.length; i++)
- {
- eval(onload_functions[i]);
- }
- }
-
- window.onunload = function()
- {
- for (i = 0; i <= onunload_functions.length; i++)
- {
- eval(onunload_functions[i]);
- }
- }
-
- // ]]>
- </script>
- [/code]
-
Gives:
-
- <script type="text/javascript">
- // <![CDATA[
- var jump_page = 'Enter the page number you wish to go to.:';
- var on_page = '';
- var per_page = '';
- var base_url = '';
- var style_cookie = 'phpBBstyle';
- var onload_functions = new Array();
- var onunload_functions = new Array();
-
-
- /**
- * Find a member
- */
- function find_username()
- {
- return false;
- }
-
- /**
- * New function for handling multiple calls to window.onload and window.unload by pentapenguin
- */
- window.onload = function()
- {
- for (i = 0; i <= onload_functions.length; i++)
- {
- eval(onload_functions[i]);
- }
- }
-
- window.onunload = function()
- {
- for (i = 0; i <= onunload_functions.length; i++)
- {
- eval(onunload_functions[i]);
- }
- }
-
- // ]]>
- </script>
-
The world is full of love and peace ^_^
-
lmame
- Admin
-
- Posts: 8997
- Joined: Mon Aug 06, 2007 4:42 pm
- Location: July City
-
by Rifke on Sat Sep 22, 2007 12:10 pm
For SQL statements:
-
- [code=sql]
- SELECT table1.field1,table2.field2 FROM table1 AS table1
- INNER JOIN table2 AS table2
- ON ( table1.field4 = table2.field3 OR table1.field3 = table2.field4 )
- WHERE
- table2.field5 > CURRENT_DATE()
- GROUP BY
- table1.field6
- [/code]
-
Gives:
-
- SELECT table1.field1,table2.field2 FROM table1 AS table1
- INNER JOIN table2 AS table2
- ON ( table1.field4 = table2.field3 OR table1.field3 = table2.field4 )
- WHERE
- table2.field5 > CURRENT_DATE()
- GROUP BY
- table1.field6
-
-
Rifke
- Pero pero
-
- Posts: 719
- Joined: Thu Aug 09, 2007 3:01 pm
- Location: Belgium
-
Return to PHP / Web Guides, Scripts and tools.
Users browsing this forum: No registered users and 1 guest