コード例 #1
0
ファイル: main.php プロジェクト: jaranvil/CraftNanny
    $xmlRoot->appendChild($debugInfo);
    $requestOptions = $xmlDoc->createElement('options');
    $debugInfo->appendChild($requestOptions);
    $textNode = $xmlDoc->createTextNode($_REQUEST['a']);
    $requestOptions->appendChild($textNode);
}
foreach ($actionArray as $action) {
    switch ($action) {
        case "setuprecord":
            $xmlRoot->appendChild(setUpRecord($dbconn, $ldapConfig, $xmlDoc, $_REQUEST['username']));
            break;
        case "getPosts":
            $xmlRoot->appendChild(getPosts($dbConn, $xmlDoc, $_REQUEST['page'], $_REQUEST['sub'], $_REQUEST['user'], $_REQUEST['comments']));
            break;
        case "email":
            phpMailer($xmlDoc, $_REQUEST['name'], $_REQUEST['email'], $_REQUEST['subject'], $_REQUEST['msg']);
            break;
        case "doesUserExist":
            $xmlRoot->appendChild(doesUserExist($dbconn, $xmlDoc, $_REQUEST['id'], $_REQUEST['user_type']));
            break;
        case "addGoogleUser":
            $xmlRoot->appendChild(addGoogleUser($dbconn, $xmlDoc, $_REQUEST['id'], $_REQUEST['name'], $_REQUEST['email'], $_REQUEST['url']));
            break;
        case "addPost":
            $xmlRoot->appendChild(addPost($dbconn, $xmlDoc, $_REQUEST['id'], $_REQUEST['title'], $_REQUEST['text'], $_REQUEST['url'], $_REQUEST['sub']));
            break;
        case "userInfo":
            $xmlRoot->appendChild(userInfo($dbconn, $xmlDoc, $_REQUEST['id']));
            break;
        case "editUsername":
            $xmlRoot->appendChild(editUsername($dbconn, $xmlDoc, $_REQUEST['id'], $_REQUEST['username']));
コード例 #2
0
ファイル: Core.php プロジェクト: oriolet/bootils
 public function fastMail($to = null, $subject = null, $body = null, $extras = array())
 {
     if ($to == null || $subject == null || $body == null) {
         return false;
     }
     if (class_exists('Swift_SmtpTransport') && $this->smpt_user != false && $this->smtp_password != false) {
         return swiftMail($to, $subject, $body, $extras, $this->getAllMailValues());
     } else {
         if (class_exists('PHPMailer') && $this->smpt_user != false && $this->smtp_password != false) {
             return phpMailer($to, $subject, $body, $extras, $this->getAllMailValues());
         } else {
             return phpMail($to, $subject, $body, $extras, $this->getAllMailValues());
         }
     }
 }