芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/clients/_syntaxis.fr/wp-content/plugins/watu/lib/functions.php
"; exit; } // escapes user input to be usable in preg_replace & other preg functions function watu_preg_escape($input) { return str_replace(array('^', '.', '|', '(', ')', '[', ']', '*', '+', '?', '{', '}', '$', '/'), array('\^', '\.', '\|', '\(', '\)', '\[', '\]', '\*', '\+', '\?', '\{', '\}', '\$', '\/' ), $input); } // notify admin / user about taken quiz function watu_notify($exam, $uid, $output, $who = 'admin') { global $user_email; $admin_email = watu_admin_email(); if(strstr($admin_email, '<')) { $parts = explode('<', $admin_email); $admin_email = trim(str_replace('>', '', $parts[1])); } $admin_emails = array(); if(!empty($exam->notify_email)) { $emails = explode(',', $exam->notify_email); foreach($emails as $email) $admin_emails[] = trim($email); } else $admin_emails[] = $admin_email; // different output for user / admin? if(strstr($output, '{{{split}}}')) { $parts = explode('{{{split}}}', $output); if($who == 'admin') $output = $parts[1]; else $output = $parts[0]; } // replace styles in the snapshot with the images $correct_style=' style="padding-right:20px;background:url('.WATU_URL.'correct.png) no-repeat right top;" '; $wrong_style=' style="padding-right:20px;background:url('.WATU_URL.'wrong.png) no-repeat right top;" '; $user_answer_style = ' style="font-weight:bold;" '; $output=str_replace('>