a:5:{i:0;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:19:"app_form_edit_users";s:4:"nome";s:13:"onAfterInsert";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:151:"$sql = "INSERT INTO sec_users_apps(login, app_name)
	     SELECT '". {login}."', app_name FROM sec_apps ";
sc_exec_sql($sql);


sc_commit_trans();";}i:1;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:19:"app_form_edit_users";s:4:"nome";s:14:"onBeforeInsert";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:112:"if({pswd} != {confirm_pswd})
{
	sc_error_message({lang_error_pswd});
	sc_error_exit();
}
{pswd} = ({pswd});";}i:2;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:19:"app_form_edit_users";s:4:"nome";s:14:"onBeforeUpdate";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:3;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:19:"app_form_edit_users";s:4:"nome";s:10:"onValidate";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:4;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:19:"app_form_edit_users";s:4:"nome";s:18:"send_mail_to_admin";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:1237:"$sql = "SELECT
		email
	FROM
		sec_users
	WHERE
		priv_admin = 'Y'";
		
sc_lookup(rs,$sql);

$emails_admin = array();
if({rs} !== FALSE && count({rs}) != 0)
{
	foreach({rs} as $value)
		$emails_admin[] = $value[0];
}
$emails_admin = implode(', ', $emails_admin);

/**
 * Send a simple email
 */

// Email parameters
$mail_smtp_server = 'smtp.mail.yahoo.com.br';        // SMTP server name or IP address
$mail_smtp_user   = 'scriptcase@yahoo.com.br';                   // SMTP user name
$mail_smtp_pass   = 'Netmake32';			// SMTP password
$mail_from        = 'scriptcase@yahoo.com.br';          // From email
$mail_to          = $emails_admin;         // To email

$mail_message     = sprintf({lang_new_user_sign_in}, {name}, {email}, {email});

$mail_subject     = {lang_subject_mail_new_user}; 
$mail_format      = 'H';                       // Message format: (T)ext or (H)tml

// Send email
sc_mail_send($mail_smtp_server,
             $mail_smtp_user,
             $mail_smtp_pass,
             $mail_from,
             $mail_to,
             $mail_subject,
             $mail_message,
             $mail_format,
             '','', '587');
sc_log_add("New user", {lang_send_mail_admin});
";}}