includes/functions.php
changeset 1253 13f8d373da67
parent 1251 d543689ed2eb
child 1259 49db7495f6b8
equal deleted inserted replaced
1252:e34c23a35dc9 1253:13f8d373da67
  1438 
  1438 
  1439 function jsdie($text) {
  1439 function jsdie($text) {
  1440 	global $db, $session, $paths, $template, $plugins; // Common objects
  1440 	global $db, $session, $paths, $template, $plugins; // Common objects
  1441 	$text = rawurlencode($text . "\n\nSQL Backtrace:\n" . $db->sql_backtrace());
  1441 	$text = rawurlencode($text . "\n\nSQL Backtrace:\n" . $db->sql_backtrace());
  1442 	echo 'document.getElementById("ajaxEditContainer").innerHTML = unescape(\''.$text.'\');';
  1442 	echo 'document.getElementById("ajaxEditContainer").innerHTML = unescape(\''.$text.'\');';
  1443 }
       
  1444 
       
  1445 /**
       
  1446  * Capitalizes the first letter of a string
       
  1447  * @param $text string the text to be transformed
       
  1448  * @return string
       
  1449  */
       
  1450 
       
  1451 function capitalize_first_letter($text)
       
  1452 {
       
  1453 	return strtoupper(substr($text, 0, 1)) . substr($text, 1);
       
  1454 }
  1443 }
  1455 
  1444 
  1456 /**
  1445 /**
  1457  * Checks if a value in a bitfield is on or off
  1446  * Checks if a value in a bitfield is on or off
  1458  * @param $bitfield int the bit-field value
  1447  * @param $bitfield int the bit-field value