Alexandre Cisneiros
Members-
Content Count
22 -
Joined
-
Last visited
About Alexandre Cisneiros
-
Rank
Newbie [Level 1]
-
Hi everybody. This is my 3rd script, but this dont use MySQL It does this: divide the site in SECTIONS and PAGES. Benefits: -You have to create just the text of your pages, no create ech page with the entire layout again. -If its just the text that is included, you just have to have one page with the layout, witch is the INDEX.PHP. -If you chanche the layout in the index.php, you DONT HAVE TO change in the other pages. Here is the code: <?php //-----------------------------------------// //ACAF Paginação // //by Alexandre Cisneiros // //-----------------------------------------// $section2=$_GET['section']; $page2=$_GET['page']; if(file_exists("$section2/$page2.php")){ include("$section2/$page2.php"); } else if($section2 != '' && $page2 == ''){ if(file_exists("$section2/index.php")){ include("$section2/index.php"); } } else if($section2 == "index" || $section2 == "home" || $section2 == "default" || $section2 == ''){ include("main_page.php"); } else{ echo ("404: The page was not found."); } ?> How to use:If you want to have a page caled 'my_book.php' in the directory 'library', you can create a link like this: http://ww38.yoursite.com/index.php?section=ry&page=my_book or just http://ww38.yoursite.com/?section=libary&page=my_book To crate a link to the index, you have 4 options: http://ww38.yoursite.com/ ----JUST THE SITE ADRESS, WITH NOTHIS AFTER IT http://ww38.yoursite.com/?section=index http://ww38.yoursite.com/?section=main http://ww38.yoursite.com/?section=deafult This will load a page called PRINCIPAL.PHP (lower case) To create a link to the INDEX.PHP (lower case) of some SECTION, do this: http://ww38.yoursite.com/?section=my_section This will include the index.php of the directory MY_SECTION (lower case, again, ) ---------REMEBER-------- -The files HAVE TO BE IN .php ! -The falis MUST
-
Hi! This is my 2nd code of PHP + MySQL. This code is VERY simple: it encript the data in the MySQL DB. Here we go! ------------------------------------------------------------------------ <?php $password = "abc"; $new_password = md5($password); echo $new_password; ?>The password "abc" was codfied using md5() This will be: 900150983cd24fb0d6963f7d28e17f72 <?php $normal_pass = "abc"; $encripted_pass = "900150983cd24fb0d6963f7d28e17f72"; if(md5($normal_pass) == $encripted_pass) echo "Login Sucessful!"; else echo "Incorrect password."; ?>This check if the password in the var is the "same" as the password in the DB
-
Hi! I will post here a code for separating the results of MySQL in pages. You ask: Why separete? I answer: Imagin that you have 1523 results to display. I dont have to say anything. =P Here is it. ------------------------------------------------------------------- <?php$conect = mysql_connect("host","user","password");$select_db = mysql_select_db("database");$query = "SELECT * FROM mytable";$results = "15"; //Number of results displayed per page.if (!$page) { $counter = "1";} else { $pcounter = $page;}$start = $counter - 1;$start = $counter * $results;$limit = mysql_query("$query LIMIT $start,$results");$all = mysql_query("$query");$total_registers = mysql_num_rows($all);$total_pages = $total_registers / $results;//---------NOW LETS SHOW EVERYTHING!! =Dwhile ($data = mysql_fetch_array($limit)) { $name = $data["name"]; echo "Name: $name<br>";}$prev = $counter -1;next = $counter +1;if ($counter>1) { echo " <a href='?page=$prev'><- Previous</a> ";}echo "|";if ($counter<$total_pages) { echo " <a href='?pagina=$next'>Next -></a>";}?> [[MODERATOR PLEASE DELETE THIS POST AND EDIT MY FIRST POST]] <?php$conect = mysql_connect("host","user","password");$select_db = mysql_select_db("database");$query = "SELECT * FROM mytable";$results = "15"; //Number of results displayed per page.if (!$page) { $counter = "1";} else { $counter = $page; //CHANGE 'pcounter' to 'counter'}
-
Yes, it's true. But imagin: Your mobile fone is charged by each Megabyte. Now imagin the money that you will pay loading lots of pictures, like logos, emoticons, etc, in GIF or JPG (becose in WAP you use WBMP as image type, and is much smaller). Once the user of your WAP site is very rich, is a little impossible acecss your site many times by the phone.
-
Putfile is a free digital media hosting service. Here you can upload videos and images to the internet for free. You can upload: Media Type......Accepted Extensions............................Max Size........Number of Uploads Images..........jpg, .jpeg .gif, .png..........................2MB.............Unlimited Video...........wmv .avi .mpg .mpeg .mov .asf .asx .mp4 .3g2...25MB............Unlimited Audio ..........mp3 .mid .wav .midi............................25MB............Unlimited Flash...........swf............................................25MB............Unlimited You can be a member or not. If you are a member, you can have a custom page with your files separated in Picrutes and Media. http://forums.xisto.com/no_longer_exists/ - Putfile!
-
Multilingual Site: Send The User To Page Of Choice
Alexandre Cisneiros replied to Alexandre Cisneiros's topic in Programming
Ok. Here is it: switch ($HTTP_ACCEPT_LANGUAGE) {case "en-us": header("Location: index_eng.html");break;case "en-uk": header("Location: index_enuk.html");break;case "pt-br": header("Location: index_ptbr.html");break;}// ETC...... You can add it on the site. Example: -
Question About Upgrading Hosting Package
Alexandre Cisneiros replied to Alexandre Cisneiros's topic in Web Hosting Support
Thanks! So if thing is more advantage get the #02 Plan. Thanks again. -
Sorry, I could not understand this... I'm going do make the modules like forums, downloads, etc. by my self.But I want to know if is better the CMS comes with manny modules, or only the module User-accounts, and who download it (will be open-source) goes to the site and download the modules that he/she wants.
-
Hi! I'm here to ask your opinion: I'm going to create my CMS based on PHP (i isn't named yet) and i what you thing that is more important. Please answer this questions: Multilingual Suport: -With Languages? Features: -Forums? -Downloads? -Blog? -User account? -Or just it comes with User account and the user who wants download the separetad modules? Templates: -If you download a CMS, you prefer to download it with only the default template and get separated templates, or download with many (3-8) templates? Database: -MySQL? -PostgreeSQL? -Other database? -Many databases? Others: -Leave sugestions, please! --------------------------------------- If you can help-me, please reply this topic.
-
Question About Upgrading Hosting Package
Alexandre Cisneiros replied to Alexandre Cisneiros's topic in Web Hosting Support
Thanks for the reply, but isn't this. Here is one example: I have 10 credits. I get the #01 Hosting Plan. The Hosting Plan #02 costs 30 credits. To UPGRADE from the #01 to the #02, I need to have 20 credits (because I used 10 on the #01 hosting plan), or I need to have 30 credits (the original "price")? -
Hi! I found this Newsletter System, based on TXT files, not MySQL. It is VERRY simple. Here is the instructions: ---------------------------------------------- |### Newsletter System 1.0 L.E. ###| ---------------------------------------------- Leandro Maniezo lemaniezo@ig.com.br TRANSLATION FROM PORTUGUESE-BR TO ENGLISH: Alexandre Cisneiros Filho misteryoshi@gmail.com Introduction ---------- - Put line-by-line the adresses on the file emails_bd.txt. - Set the permitions of the txt files to be writebly. - After sendin, all the adresses who recived the message are stored at log.txt. - If some people dont recive the message, deleta all adresses on the file emails_bd that are in log.txt and send again. Instaling ---------- - Put all the files in a folder on the site and set the permitions to the TXT files. Obs.: NO Javascript allowed. If you want to send images, you need to host them. Just download the attached file!
-
If I "buy" the hosting package #01, i "pay" 10 credits. If I upgrade to the package #02, i "pay" 30 credits or just 20?