Archive

Archive for October, 2007

JavaScript Cookies

October 29th, 2007 karlosp No comments
JAVA:
  1. function createCookie(name,value,days) {
  2.     if (days) {
  3.         var date = new Date();
  4.         date.setTime(date.getTime()+(days*24*60*60*1000));
  5.         var expires = "; expires="+date.toGMTString();
  6.     }
  7.     else var expires = "";
  8.     document.cookie = name+"="+value+expires+"; path=/";
  9. }
  10.  
  11. function readCookie(name) {
  12.     var nameEQ = name + "=";
  13.     var ca = document.cookie.split(';');
  14.     for(var i=0;i <ca.length;i++) {
  15.         var c = ca[i];
  16.         while (c.charAt(0)==' ') c = c.substring(1,c.length);
  17.         if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  18.     }
  19.     return null;
  20. }
  21.  
  22. function eraseCookie(name) {
  23.     createCookie(name,"",-1);
  24. }

Categories: Malo mešano Tags:

V katero smer se vrti veš samo ti

October 26th, 2007 karlosp No comments

brain

Categories: Malo mešano Tags:

Joomla

October 23rd, 2007 karlosp No comments
Categories: Malo mešano Tags:

Protected: Mobilni radar

October 21st, 2007 karlosp Enter your password to view comments.

This post is password protected. To view it please enter your password below:


Categories: Ideo page, Malo mešano Tags: , ,

Telme Regions and Telme Languages

October 16th, 2007 karlosp No comments

Telme LanguagesTelme Regions

Odlična stran kjer zveste več o TelMe
, revolucionarni dimenziji komuniciranja!

MindMaster Test

October 16th, 2007 karlosp No comments

Categories: Malo mešano Tags:

Protected: MindManager Pro v7 pesmica

October 12th, 2007 karlosp Enter your password to view comments.

This post is password protected. To view it please enter your password below:


Categories: Pesmica Tags:

Arnes DNS – 193.2.1.66 ter 193.2.1.72

October 11th, 2007 karlosp No comments

Arnes DNS - 193.2.1.66 ter 193.2.1.72

SIOL DNS -
Primary DNS: 193.189.160.13
Secondary DNS: 193.189.160.23

Categories: Malo mešano Tags:

WordPress Custom Anti Spam Protection

October 8th, 2007 karlosp No comments

Edit coments.php
Varnostni test: obkljukaj:

Edit wp-comments-post.php line: 68

PHP:
  1. if ( '' == $comment_content || !isset($_POST['xxxxx']) )
  2.    wp_die( __('Error: please type a comment.') );

Categories: Malo mešano Tags:

Varno šifriranje in brisanje datotek

October 8th, 2007 karlosp No comments

Get Data From MySQL Database

October 8th, 2007 karlosp No comments
PHP:
  1. <?php
  2. include 'config.php';
  3. include 'opendb.php';
  4.  
  5. $query = 'SELECT * FROM news WHERE id="'.mysql_real_escape_string($_GET['id']).'"';
  6. $result = mysql_query($query);
  7.  
  8. echo mysql_result($result, 2); // outputs third employee's name
  9.  
  10. while($row = mysql_fetch_assoc($result))
  11. {
  12.     echo "Name :{$row['name']} <br>" .
  13.          "Subject : {$row['subject']} <br />" .
  14.          "Message : {$row['message']} <br /><br />";
  15. }
  16.  
  17. UPDATE table_name
  18. SET column_name = new_value
  19. WHERE column_name = some_value
  20.  
  21. include 'closedb.php';
  22. ?>

Categories: php_mysql Tags:

Vim Tips

October 6th, 2007 karlosp No comments


Cut and Paste:

1. Place the cursor at the beginning of the block you want to CUT.
2. Mark it with md
3. Go to the end of the block.
4. Cut it with d'd
5. Go to the new location that you want to PASTE those text.
6. Press P.

Copy and Paste:

1. Place the cursor at the beginning of the block you want to COPY.
2. Mark it with my
3. Go to the end of the block.
4. Cut it with y'y
5. Go to the new location that you want to PASTE those text.
6. Press P.

Categories: Malo mešano Tags:

WordPress Code Highlight

October 4th, 2007 karlosp No comments

In da, končno sem našel odlični "barvalnik" programske kode, prav takšnega, kot sem si ga zamislil!
Code Highlighter plugin
Demo:

PHP:
  1. <?php
  2. $user="xxxxxx";
  3. $password="yyyyyy";
  4. $database="my_database";
  5. @mysql_connect(localhost,$user,$password);
  6. @mysql_select_db($database) or die( "Unable to select database");
  7. @mysql_query("SET NAMES utf8"); //reši nekatere probleme pri šumnikih
  8. ?>

Categories: php_mysql Tags: , ,
101895 pages viewed, 152 today
53334 visits, 88 today
FireStats icon Powered by FireStats