From: <dai...@us...> - 2011-05-29 04:45:17
|
Revision: 4580 http://web-erp.svn.sourceforge.net/web-erp/?rev=4580&view=rev Author: daintree Date: 2011-05-29 04:45:11 +0000 (Sun, 29 May 2011) Log Message: ----------- check for < or > in includes/MiscFunction.php CheckIllegalCharacters Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-05-29 04:07:16 UTC (rev 4579) +++ trunk/includes/MiscFunctions.php 2011-05-29 04:45:11 UTC (rev 4580) @@ -115,7 +115,9 @@ OR strstr($CheckVariable,"\"") OR strstr($CheckVariable,'&') OR strstr($CheckVariable,"\\") - OR strstr($CheckVariable,'"')){ + OR strstr($CheckVariable,'"') + OR strstr($CheckVariable,'>') + OR strstr($CheckVariable,'<')){ return true; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-05-29 04:45:17
|
Revision: 4580 http://web-erp.svn.sourceforge.net/web-erp/?rev=4580&view=rev Author: daintree Date: 2011-05-29 04:45:11 +0000 (Sun, 29 May 2011) Log Message: ----------- check for < or > in includes/MiscFunction.php CheckIllegalCharacters Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-05-29 04:07:16 UTC (rev 4579) +++ trunk/includes/MiscFunctions.php 2011-05-29 04:45:11 UTC (rev 4580) @@ -115,7 +115,9 @@ OR strstr($CheckVariable,"\"") OR strstr($CheckVariable,'&') OR strstr($CheckVariable,"\\") - OR strstr($CheckVariable,'"')){ + OR strstr($CheckVariable,'"') + OR strstr($CheckVariable,'>') + OR strstr($CheckVariable,'<')){ return true; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-12-02 21:14:09
|
Revision: 4760 http://web-erp.svn.sourceforge.net/web-erp/?rev=4760&view=rev Author: daintree Date: 2011-12-02 21:14:02 +0000 (Fri, 02 Dec 2011) Log Message: ----------- Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-11-30 15:20:37 UTC (rev 4759) +++ trunk/includes/MiscFunctions.php 2011-12-02 21:14:02 UTC (rev 4760) @@ -316,14 +316,17 @@ function locale_number_format($Number, $DecimalPlaces=0) { global $DecimalPoint; global $ThousandsSeparator; - - if (!is_numeric($DecimalPlaces) AND $DecimalPlaces == 'Variable'){ - $DecimalPlaces = mb_strlen($Number) - mb_strlen(intval($Number)); - if ($DecimalPlaces > 0){ - $DecimalPlaces--; + if ($_SESSION['Language']=='hi_IN.utf8' OR $_SESSION['Language']=='en_IN.utf8'){ + return indian_number_format($Number,$DecimalPlaces); + } else { + if (!is_numeric($DecimalPlaces) AND $DecimalPlaces == 'Variable'){ + $DecimalPlaces = mb_strlen($Number) - mb_strlen(intval($Number)); + if ($DecimalPlaces > 0){ + $DecimalPlaces--; + } } + return number_format($Number,$DecimalPlaces,$DecimalPoint,$ThousandsSeparator); } - return number_format($Number,$DecimalPlaces,$DecimalPoint,$ThousandsSeparator); } /* and to parse the input of the user into useable number */ @@ -344,4 +347,31 @@ } +function indian_number_format($Number,$DecimalPlaces){ + $IntegerNumber = intval($Number); + $DecimalValue = $Number - $IntegerNumber; + if ($DecimalPlaces !='Variable'){ + $DecimalValue= round($DecimalValue,$DecimalPlaces); + } + if (strlen(substr($DecimalValue,2))>0){ + $DecimalValue = substr($DecimalValue,1); + } else { + $DecimalValue =''; + } + if(strlen($IntegerNumber)>3){ + $LastThreeNumbers = substr($IntegerNumber, strlen($IntegerNumber)-3, strlen($IntegerNumber)); + $RestUnits = substr($IntegerNumber, 0, strlen($IntegerNumber)-3); // extracts the last three digits + $RestUnits = (strlen($RestUnits)%2 == 1)?'0'.$RestUnits:$RestUnits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. + $FirstPart =''; + $ExplodedUnits = str_split($RestUnits, 2); + for($i=0; $i<sizeof($ExplodedUnits); $i++){ + $FirstPart .= intval($ExplodedUnits[$i]).','; // creates each of the 2's group and adds a comma to the end + } + + return $FirstPart.$LastThreeNumbers.$DecimalValue; + } else { + return $IntegerNumber. $DecimalValue; + } +} + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-12-02 21:14:09
|
Revision: 4760 http://web-erp.svn.sourceforge.net/web-erp/?rev=4760&view=rev Author: daintree Date: 2011-12-02 21:14:02 +0000 (Fri, 02 Dec 2011) Log Message: ----------- Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-11-30 15:20:37 UTC (rev 4759) +++ trunk/includes/MiscFunctions.php 2011-12-02 21:14:02 UTC (rev 4760) @@ -316,14 +316,17 @@ function locale_number_format($Number, $DecimalPlaces=0) { global $DecimalPoint; global $ThousandsSeparator; - - if (!is_numeric($DecimalPlaces) AND $DecimalPlaces == 'Variable'){ - $DecimalPlaces = mb_strlen($Number) - mb_strlen(intval($Number)); - if ($DecimalPlaces > 0){ - $DecimalPlaces--; + if ($_SESSION['Language']=='hi_IN.utf8' OR $_SESSION['Language']=='en_IN.utf8'){ + return indian_number_format($Number,$DecimalPlaces); + } else { + if (!is_numeric($DecimalPlaces) AND $DecimalPlaces == 'Variable'){ + $DecimalPlaces = mb_strlen($Number) - mb_strlen(intval($Number)); + if ($DecimalPlaces > 0){ + $DecimalPlaces--; + } } + return number_format($Number,$DecimalPlaces,$DecimalPoint,$ThousandsSeparator); } - return number_format($Number,$DecimalPlaces,$DecimalPoint,$ThousandsSeparator); } /* and to parse the input of the user into useable number */ @@ -344,4 +347,31 @@ } +function indian_number_format($Number,$DecimalPlaces){ + $IntegerNumber = intval($Number); + $DecimalValue = $Number - $IntegerNumber; + if ($DecimalPlaces !='Variable'){ + $DecimalValue= round($DecimalValue,$DecimalPlaces); + } + if (strlen(substr($DecimalValue,2))>0){ + $DecimalValue = substr($DecimalValue,1); + } else { + $DecimalValue =''; + } + if(strlen($IntegerNumber)>3){ + $LastThreeNumbers = substr($IntegerNumber, strlen($IntegerNumber)-3, strlen($IntegerNumber)); + $RestUnits = substr($IntegerNumber, 0, strlen($IntegerNumber)-3); // extracts the last three digits + $RestUnits = (strlen($RestUnits)%2 == 1)?'0'.$RestUnits:$RestUnits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. + $FirstPart =''; + $ExplodedUnits = str_split($RestUnits, 2); + for($i=0; $i<sizeof($ExplodedUnits); $i++){ + $FirstPart .= intval($ExplodedUnits[$i]).','; // creates each of the 2's group and adds a comma to the end + } + + return $FirstPart.$LastThreeNumbers.$DecimalValue; + } else { + return $IntegerNumber. $DecimalValue; + } +} + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-17 07:39:37
|
Revision: 5513 http://web-erp.svn.sourceforge.net/web-erp/?rev=5513&view=rev Author: tim_schofield Date: 2012-07-17 07:39:26 +0000 (Tue, 17 Jul 2012) Log Message: ----------- Kalmer Piiskop: Fix the link for MediaWiki and DocuWiki Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2012-07-17 06:09:37 UTC (rev 5512) +++ trunk/includes/MiscFunctions.php 2012-07-17 07:39:26 UTC (rev 5513) @@ -238,9 +238,9 @@ if ($_SESSION['WikiApp']==_('WackoWiki')){ echo '<a target="_blank" href="' . $WikiPath . $type . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />'; } elseif ($_SESSION['WikiApp']==_('MediaWiki')){ - echo '<a target="_blank" href="' . $WikiPath . $_SESSION['WikiPath'] . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />'; + echo '<a target="_blank" href="' . $WikiPath . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />'; } elseif ($_SESSION['WikiApp']==_('DokuWiki')){ - echo $WikiPath . $_SESSION['WikiPath'] . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />'; + echo $WikiPath . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />'; } }//wikiLink This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-17 07:39:37
|
Revision: 5513 http://web-erp.svn.sourceforge.net/web-erp/?rev=5513&view=rev Author: tim_schofield Date: 2012-07-17 07:39:26 +0000 (Tue, 17 Jul 2012) Log Message: ----------- Kalmer Piiskop: Fix the link for MediaWiki and DocuWiki Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2012-07-17 06:09:37 UTC (rev 5512) +++ trunk/includes/MiscFunctions.php 2012-07-17 07:39:26 UTC (rev 5513) @@ -238,9 +238,9 @@ if ($_SESSION['WikiApp']==_('WackoWiki')){ echo '<a target="_blank" href="' . $WikiPath . $type . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />'; } elseif ($_SESSION['WikiApp']==_('MediaWiki')){ - echo '<a target="_blank" href="' . $WikiPath . $_SESSION['WikiPath'] . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />'; + echo '<a target="_blank" href="' . $WikiPath . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />'; } elseif ($_SESSION['WikiApp']==_('DokuWiki')){ - echo $WikiPath . $_SESSION['WikiPath'] . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />'; + echo $WikiPath . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />'; } }//wikiLink This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2013-01-04 00:14:36
|
Revision: 5789 http://sourceforge.net/p/web-erp/reponame/5789 Author: daintree Date: 2013-01-04 00:14:33 +0000 (Fri, 04 Jan 2013) Log Message: ----------- Bob Thomas: Fix Wiki Link for MediaWiki - had double forwardslash shbe single only Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2013-01-02 03:22:38 UTC (rev 5788) +++ trunk/includes/MiscFunctions.php 2013-01-04 00:14:33 UTC (rev 5789) @@ -241,23 +241,23 @@ } -function wikiLink($type, $id) { +function wikiLink($WikiType, $WikiPageID) { if (strstr($_SESSION['WikiPath'], 'http:')) { $WikiPath=$_SESSION['WikiPath']; } else { $WikiPath='../' . $_SESSION['WikiPath'] . '/'; } if ($_SESSION['WikiApp']==_('WackoWiki')){ - echo '<a target="_blank" href="' . $WikiPath . $type . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />'; + echo ' ' . _('Wiki ' . $WikiType . ' Knowlege Base') . ' <' . $WikiPath . +$WikiType . $WikiPageID . '> <br />'; } elseif ($_SESSION['WikiApp']==_('MediaWiki')){ - echo '<a target="_blank" href="' . $WikiPath . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />'; + echo ' ' . _('Wiki ' . $WikiType . ' Knowlege Base') . ' <' . $WikiPath . +'index.php/' . $WikiType . '/' . $WikiPageID . '> <br />'; } elseif ($_SESSION['WikiApp']==_('DokuWiki')){ - echo $WikiPath . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />'; + echo $WikiPath . '/doku.php?id=' . $WikiType . ':' . $WikiPageID . ' ' . _('Wiki ' . +$WikiType . ' Knowlege Base') . ' <br />'; } - -}//wikiLink - - +} // Lindsay debug stuff function LogBackTrace( $dest = 0 ) { error_log( "***BEGIN STACK BACKTRACE***", $dest ); |
From: <dai...@us...> - 2013-02-02 00:07:17
|
Revision: 5810 http://sourceforge.net/p/web-erp/reponame/5810 Author: daintree Date: 2013-02-02 00:07:10 +0000 (Sat, 02 Feb 2013) Log Message: ----------- Fixes to wiki links Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2013-02-02 00:01:58 UTC (rev 5809) +++ trunk/includes/MiscFunctions.php 2013-02-02 00:07:10 UTC (rev 5810) @@ -248,11 +248,11 @@ $WikiPath='../' . $_SESSION['WikiPath'] . '/'; } if ($_SESSION['WikiApp']==_('WackoWiki')){ - echo '<a target="_blank" href="' . $WikiPath . $WikiType . $WikiPageID . '" target="_blank">' . _('Wiki ' . $WikiType . ' Knowledge Base') . ' </a> <br />'; + echo '<a target="_blank" href="' . $WikiPath . $WikiType . $WikiPageID . '">' . _('Wiki ' . $WikiType . ' Knowledge Base') . ' </a> <br />'; } elseif ($_SESSION['WikiApp']==_('MediaWiki')){ echo '<a target="_blank" href="' . $WikiPath . 'index.php/' . $WikiType . '/' . $WikiPageID . '">' . _('Wiki ' . $WikiType . ' Knowledge Base') . '</a><br />'; } elseif ($_SESSION['WikiApp']==_('DokuWiki')){ - echo '<a target="_blank" href="' . $WikiPath . '/doku.php?id=' . $WikiType . ':' . $WikiPageID . '" target="_blank">' . _('Wiki ' . $WikiType . ' Knowledge Base') . '</a><br />'; + echo '<a target="_blank" href="' . $WikiPath . '/doku.php?id=' . $WikiType . ':' . $WikiPageID . '">' . _('Wiki ' . $WikiType . ' Knowledge Base') . '</a><br />'; } } |
From: <ex...@us...> - 2013-05-02 03:36:30
|
Revision: 5875 http://sourceforge.net/p/web-erp/reponame/5875 Author: exsonqu Date: 2013-05-02 03:36:27 +0000 (Thu, 02 May 2013) Log Message: ----------- 05/02/2013 Exson: Add SendmailBySmtp function to MiscFunctions.php Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2013-05-02 03:35:20 UTC (rev 5874) +++ trunk/includes/MiscFunctions.php 2013-05-02 03:36:27 UTC (rev 5875) @@ -11,7 +11,12 @@ echo getMsg($Msg, $Type, $Prefix); }//prnMsg +function prnMsg1($Msg,$Type='info', $Prefix=''){ + return getMsg($Msg, $Type, $Prefix); + +}//prnMsg + function reverse_escape($str) { $search=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); $replace=array("\\","\0","\n","\r","\x1a","'",'"'); @@ -110,12 +115,11 @@ function ContainsIllegalCharacters ($CheckVariable) { if (mb_strstr($CheckVariable,"'") - OR mb_strstr($CheckVariable,'+') + // OR mb_strstr($CheckVariable,'+') OR mb_strstr($CheckVariable,'?') - OR mb_strstr($CheckVariable,'.') OR mb_strstr($CheckVariable,"\"") OR mb_strstr($CheckVariable,'&') - OR mb_strstr($CheckVariable,"\\") + // OR mb_strstr($CheckVariable,"\\") OR mb_strstr($CheckVariable,'"') OR mb_strstr($CheckVariable,'>') OR mb_strstr($CheckVariable,'<')){ @@ -133,8 +137,14 @@ echo '</pre></div>'; } +function json_result($result,$msg){ + $MES[$result] = $msg; + echo json_encode($MES); + +} + class XmlElement { var $name; var $attributes; @@ -402,4 +412,24 @@ } } -?> \ No newline at end of file +function SendMailBySmtp(&$mail,$To) { + + if(strpos('@',$_SESSION['SMTPSettings']['username'])){//user has set the fully mail address as user name + $mail->setFrom($_SESSION['SMTPSettings']['username']); + }else{//user only set it's name instead of fully mail address + if(strpos('smtp',$_SESSION['SMTPSettings']['host'])){ + $HostDomain = substr($_SESSION['SMTPSettings']['host'],4); + } + if(!strpos('@',$_SESSION['SMTPSettings']['username'])){ + $SendFrom = $_SESSION['SMTPSettings']['username'].$HostDomain; + } + } + $mail->setFrom($SendFrom); + $result = $mail->send($To,'smtp'); + return $result; +} + + + + +?> |
From: <ex...@us...> - 2013-05-02 09:33:09
|
Revision: 5883 http://sourceforge.net/p/web-erp/reponame/5883 Author: exsonqu Date: 2013-05-02 09:33:06 +0000 (Thu, 02 May 2013) Log Message: ----------- 2/5/2013 Exson: Make correction for removing those functions not related with webERP committed last time in MiscFunctions.php. Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2013-05-02 06:42:57 UTC (rev 5882) +++ trunk/includes/MiscFunctions.php 2013-05-02 09:33:06 UTC (rev 5883) @@ -11,12 +11,7 @@ echo getMsg($Msg, $Type, $Prefix); }//prnMsg -function prnMsg1($Msg,$Type='info', $Prefix=''){ - return getMsg($Msg, $Type, $Prefix); - -}//prnMsg - function reverse_escape($str) { $search=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); $replace=array("\\","\0","\n","\r","\x1a","'",'"'); @@ -115,11 +110,12 @@ function ContainsIllegalCharacters ($CheckVariable) { if (mb_strstr($CheckVariable,"'") - // OR mb_strstr($CheckVariable,'+') + OR mb_strstr($CheckVariable,'+') OR mb_strstr($CheckVariable,'?') + OR mb_strstr($CheckVariable,'.') OR mb_strstr($CheckVariable,"\"") OR mb_strstr($CheckVariable,'&') - // OR mb_strstr($CheckVariable,"\\") + OR mb_strstr($CheckVariable,"\\") OR mb_strstr($CheckVariable,'"') OR mb_strstr($CheckVariable,'>') OR mb_strstr($CheckVariable,'<')){ @@ -137,14 +133,8 @@ echo '</pre></div>'; } -function json_result($result,$msg){ - $MES[$result] = $msg; - echo json_encode($MES); - -} - class XmlElement { var $name; var $attributes; @@ -411,7 +401,6 @@ return $IntegerNumber. $DecimalValue; } } - function SendMailBySmtp(&$mail,$To) { if(strpos('@',$_SESSION['SMTPSettings']['username'])){//user has set the fully mail address as user name @@ -430,6 +419,4 @@ } - - ?> |
From: <ex...@us...> - 2013-05-02 14:55:34
|
Revision: 5888 http://sourceforge.net/p/web-erp/reponame/5888 Author: exsonqu Date: 2013-05-02 14:55:30 +0000 (Thu, 02 May 2013) Log Message: ----------- 2/5/2013 Exson: Fixed strpos error and make the smtp server name more generic when user not use a email address. Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2013-05-02 10:37:58 UTC (rev 5887) +++ trunk/includes/MiscFunctions.php 2013-05-02 14:55:30 UTC (rev 5888) @@ -401,22 +401,24 @@ return $IntegerNumber. $DecimalValue; } } - function SendMailBySmtp(&$mail,$To) { - if(IsEmailAddress($_SESSION['SMTPSettings']['username'])){//user has set the fully mail address as user name $SendFrom = $_SESSION['SMTPSettings']['username']; - } else {//user only set it's name instead of fully mail address - if(strpos('smtp',$_SESSION['SMTPSettings']['host'])){ - $HostDomain = substr($_SESSION['SMTPSettings']['host'],4); + }else{//user only set it's name instead of fully mail address + if(strpos($_SESSION['SMTPSettings']['host'],'mail') !== false){ + $SubStr = 'mail'; + + }elseif(strpos($_SESSION['SMTPSettings']['host'],'smtp') !== false){ + $SubStr = 'smtp'; } - if(!strpos('@',$_SESSION['SMTPSettings']['username'])){ - $SendFrom = $_SESSION['SMTPSettings']['username'] . $HostDomain; - } + + $Domain = substr($_SESSION['SMTPSettings']['host'],strpos($_SESSION['SMTPSettings']['host'],$SubStr)+5); + $SendFrom = $_SESSION['SMTPSettings']['username'].'@'.$Domain; } $mail->setFrom($SendFrom); $result = $mail->send($To,'smtp'); return $result; } + ?> |
From: <ex...@us...> - 2013-05-10 11:22:47
|
Revision: 5906 http://sourceforge.net/p/web-erp/reponame/5906 Author: exsonqu Date: 2013-05-10 11:22:44 +0000 (Fri, 10 May 2013) Log Message: ----------- 10/5/2013 Exson: Add GetMailList function in MiscFunctions.php. Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2013-05-10 11:20:30 UTC (rev 5905) +++ trunk/includes/MiscFunctions.php 2013-05-10 11:22:44 UTC (rev 5906) @@ -420,5 +420,22 @@ return $result; } +function GetMailList($Recipients){ + global $db; + $ToList = array(); + $sql = "SELECT email,realname FROM mailgroupdetails INNER JOIN www_users ON www_users.userid=mailgroupdetails.userid WHERE mailgroupdetails.groupname='".$Recipients."'"; + $ErrMsg = _('Failed to retrieve mail lists'); + $result = DB_query($sql,$db,$ErrMsg); + if(DB_num_rows($result) != 0){ + + //Create the string which meets the Recipients requirements + while($myrow = DB_fetch_array($result)){ + $ToList[]= $myrow['realname'].'<'.$myrow['email'].'>'; + } + + } + return $ToList; +} + ?> |
From: <te...@us...> - 2013-05-17 23:15:40
|
Revision: 5973 http://sourceforge.net/p/web-erp/reponame/5973 Author: tehonu Date: 2013-05-17 23:15:37 +0000 (Fri, 17 May 2013) Log Message: ----------- Pak Ricard: Fix date format written into log file Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2013-05-17 13:45:57 UTC (rev 5972) +++ trunk/includes/MiscFunctions.php 2013-05-17 23:15:37 UTC (rev 5973) @@ -28,21 +28,21 @@ $Class = 'error'; $Prefix = $Prefix ? $Prefix : _('ERROR') . ' ' ._('Message Report'); if (isset($_SESSION['LogSeverity']) and $_SESSION['LogSeverity']>0) { - fwrite($LogFile, date('Y-m-d h-m-s').','.$Type.','.$_SESSION['UserID'].','.trim($Msg,',')."\n"); + fwrite($LogFile, date('Y-m-d H:i:s').','.$Type.','.$_SESSION['UserID'].','.trim($Msg,',')."\n"); } break; case 'warn': $Class = 'warn'; $Prefix = $Prefix ? $Prefix : _('WARNING') . ' ' . _('Message Report'); if (isset($_SESSION['LogSeverity']) and $_SESSION['LogSeverity']>1) { - fwrite($LogFile, date('Y-m-d h-m-s').','.$Type.','.$_SESSION['UserID'].','.trim($Msg,',')."\n"); + fwrite($LogFile, date('Y-m-d H:i:s').','.$Type.','.$_SESSION['UserID'].','.trim($Msg,',')."\n"); } break; case 'success': $Class = 'success'; $Prefix = $Prefix ? $Prefix : _('SUCCESS') . ' ' . _('Report'); if (isset($_SESSION['LogSeverity']) and $_SESSION['LogSeverity']>3) { - fwrite($LogFile, date('Y-m-d h-m-s').','.$Type.','.$_SESSION['UserID'].','.trim($Msg,',')."\n"); + fwrite($LogFile, date('Y-m-d H:i:s').','.$Type.','.$_SESSION['UserID'].','.trim($Msg,',')."\n"); } break; case 'info': @@ -50,7 +50,7 @@ $Prefix = $Prefix ? $Prefix : _('INFORMATION') . ' ' ._('Message'); $Class = 'info'; if (isset($_SESSION['LogSeverity']) and $_SESSION['LogSeverity']>2) { - fwrite($LogFile, date('Y-m-d h-m-s').','.$Type.','.$_SESSION['UserID'].','.trim($Msg,',')."\n"); + fwrite($LogFile, date('Y-m-d H:i:s').','.$Type.','.$_SESSION['UserID'].','.trim($Msg,',')."\n"); } } return '<div class="'.$Class.'"><b>' . $Prefix . '</b> : ' .$Msg . '</div>'; |
From: <te...@us...> - 2014-10-23 14:04:28
|
Revision: 6931 http://sourceforge.net/p/web-erp/reponame/6931 Author: tehonu Date: 2014-10-23 14:04:25 +0000 (Thu, 23 Oct 2014) Log Message: ----------- Use a better name for the log file Modified Paths: -------------- trunk/includes/MiscFunctions.php Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2014-10-22 09:07:47 UTC (rev 6930) +++ trunk/includes/MiscFunctions.php 2014-10-23 14:04:25 UTC (rev 6931) @@ -20,7 +20,7 @@ function getMsg($Msg,$Type='info',$Prefix=''){ $Colour=''; if (isset($_SESSION['LogSeverity']) and $_SESSION['LogSeverity']>0) { - $LogFile=fopen($_SESSION['LogPath'].'/webERP-test.log', 'a'); + $LogFile=fopen($_SESSION['LogPath'].'/webERP.log', 'a'); } switch($Type){ case 'error': |