Changeset 8166 for extensions/LCAS/trunk/include
- Timestamp:
- Dec 16, 2010, 10:53:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LCAS/trunk/include/functions.inc.php
r8159 r8166 718 718 } 719 719 720 /* ******************************************************** */721 /* **** Pending code since to find how to make it work **** */722 /* ******************************************************** */723 // Testing if FCK Editor is used. Then decoding htmlchars to avoid problems with pwg_mail()724 /*$areas = array();725 array_push( $areas,'LCAS_MailInfo_Text','LCAS_accentSensitive_Text');726 727 if (function_exists('set_fckeditor_instance'))728 {729 $fcke_config = unserialize($conf['FCKEditor']);730 foreach($areas as $area)731 {732 if (isset($fcke_config['LCAS_MailInfo_Text']) and $fcke_config['LCAS_MailInfo_Text'] = true)733 {734 $infos1_perso = html_entity_decode($infos1_perso,ENT_QUOTES,UTF-8);735 }736 737 if (isset($fcke_config['LCAS_accentSensitive_Text']) and $fcke_config['LCAS_accentSensitive_Text'] = true)738 {739 $infos2_perso = html_entity_decode($infos2_perso,ENT_QUOTES,UTF-8);740 }741 }742 }*/743 744 720 /* Sending the email with subject and contents */ 745 721 pwg_mail($email, array( … … 747 723 'content' => (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url(), 748 724 )); 749 750 /* ********************** */751 /* Email sending debugger */752 /* This is only to trace */753 /* the send of emails for */754 /* debugging */755 /* ********************** */756 //$content = (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url();757 //MailLog($email,$subject,$content,$language);758 /* ********************** */759 725 760 726 /* Switching back to default language */ … … 886 852 } 887 853 854 855 /** 856 * Function called from main.inc.php 857 * Checks if username already exists in database according of case sensitivity 858 * 859 * @param : Username 860 * 861 * @return : Bool 862 */ 863 function CaseSensitiveUsername($username) 864 { 865 global $conf; 866 867 if (isset($username)) 868 { 869 $query = " 870 SELECT ".$conf['user_fields']['username']." 871 FROM ".USERS_TABLE." 872 WHERE LOWER(".stripslashes($conf['user_fields']['username']).") = '".strtolower($username)."' 873 ;"; 874 $users = mysql_num_rows(pwg_query($query)); 875 if ($users > 0) 876 { 877 return true; 878 } 879 else 880 { 881 return false; 882 } 883 } 884 } 885 886 887 // DebugLog function 888 function DebugLog($var1, $var2, $var3, $var4) 889 { 890 $fo=fopen (LCAS_PATH.'admin/debuglog.txt','a') ; 891 fwrite($fo,"======================\n") ; 892 fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n"); 893 fwrite($fo, "\n" . $var1 . "\r\n") ; 894 fwrite($fo, "\n" . $var2 . "\r\n") ; 895 fwrite($fo, "\n" . $var3 . "\r\n") ; 896 fwrite($fo, "\n" . $var4 . "\r\n") ; 897 fclose($fo) ; 898 } 888 899 ?>
Note: See TracChangeset
for help on using the changeset viewer.