当前位置: 首页>>代码示例>>PHP>>正文


PHP create_message函数代码示例

本文整理汇总了PHP中create_message函数的典型用法代码示例。如果您正苦于以下问题:PHP create_message函数的具体用法?PHP create_message怎么用?PHP create_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了create_message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: envoyer_message

function envoyer_message($destinataire, $texte)
{
    //var globales
    global $table_conversations, $id;
    $binome = new Binome($destinataire);
    $conversation = null;
    //recherche de conversation courante
    $sql = "SELECT * FROM " . $table_conversations . " WHERE user1 = '" . $binome->nom1 . "' AND user2 = '" . $binome->nom2 . "' AND session_1 = '" . $binome->session1 . "' AND session_2 = '" . $binome->session2 . "';";
    $resultat = mysql_query($sql);
    if (!$resultat || mysql_num_rows($resultat) == 0) {
        //on cree une nouvelle conversation
        $conversation = create_conversation($destinataire);
    } else {
        $conversation = mysql_result($resultat, 0, 'id_conversation');
    }
    echo "envoi";
    //nouveau message
    create_message($conversation, $destinataire, $id, $texte);
}
开发者ID:laiello,项目名称:mon-projet-lapinou,代码行数:19,代码来源:chat_comm.inc.php

示例2: create_message

        ?>
" class="fa <?php 
        echo $link->getIconClass();
        ?>
"></i>
					<h4><?php 
        echo $link->getName();
        ?>
</h4>
				</a>
			</div>

		<?php 
    }
} else {
    create_message('info', 'No links exist.', true);
}
?>
	</div>

	<div class="row webex-host-links">
		<div class="col-lg-12">
			<h1>WebEx</h1>

			<a class="btn btn-lg btn-primary" href="https://venturamfg.webex.com/mw0401lsp12/mywebex/login/login.do?siteurl=venturamfg&login_return_url=%2Fmc0901lsp12%2Fmeetingcenter%2Fframe%2Fexpandurl.do%3Fsiteurl%3Dventuramfg">Host a Meeting</a>
			<a class="btn btn-lg btn-primary" href="<?php 
echo $options['site_url'];
?>
/conferencerooms.php">Join a Meeting</a>
		</div>
	</div>
开发者ID:Hackmastr,项目名称:apps-base,代码行数:31,代码来源:template-home.php

示例3: email_message

        //echo '<br><br><br>' . $query . '<br>';
        $result = $mysqli->query($query);
        $row = $result->fetch_assoc();
        $query = "SELECT * FROM users WHERE id = " . $row['requesterid'];
        $result = $mysqli->query($query);
        $row2 = $result->fetch_assoc();
        $query = "SELECT * FROM achievementList WHERE id = " . $row['achievementid'];
        $result = $mysqli->query($query);
        $temprow = $result->fetch_assoc();
        $row2['name'] = $temprow['name'];
        $row2['level'] = $level;
        $row2['comment'] = $row['comment'];
        if (trim($row2['comment']) == '') {
            $row2['comment'] = 'No comment entered';
        }
        email_message('Achievement ' . $row2['name'] . ' Denied', $row2['onid'] . '@oregonstate.edu', create_message('./emails/deny.eml', $row2));
        echo '<h3><BR><BR>All Done!</h3><a href="./home.php">Go Back</a>';
        exit;
    } else {
        //Should generate an email someone is poking around
        echo '';
    }
}
if (isset($_REQUEST['reviewhash'])) {
    $hash = mysqli_real_escape_string($mysqli, $_REQUEST['reviewhash']);
    if ($userrow['userlevel'] > 2) {
        echo "<div class='row'><div style='padding-top:5em;' class='col-sm-8 col-sm-offset-2'><h3>About to process hash: {$hash}</h3></div></div>";
        $query = "SELECT * FROM requests WHERE hash = '{$hash}'";
        $result = $mysqli->query($query);
        $row = $result->fetch_assoc();
        $query = "SELECT * FROM users WHERE id = " . $row['requesterid'];
开发者ID:bitschift,项目名称:CollabAchievements,代码行数:31,代码来源:approval.php

示例4: exit

if (isset($group)) {
    $groups = $DB->GetAll("SELECT * FROM customergroups WHERE name='{$group}'");
    if (count($groups) != 1) {
        echo "Grupa {$group} nie istnieje!\n";
        exit(0);
    }
    echo "Wysyłanie powiadomień do grupy '{$group}' [" . $groups[0]['id'] . "]\n";
    $customers = $DB->GetALL("SELECT * FROM customerassignments WHERE customergroupid=" . $groups[0]['id']);
    foreach ($customers as $customer) {
        $name = $LMS->GetCustomerName($customer['customerid']);
        printf("%4d: %s\n", $customer['customerid'], $name);
    }
} else {
    $customers = $DB->GetAll('SELECT * FROM customers WHERE status=3 and deleted=0');
    if (count($customers) and !$test) {
        $msgid = create_message($tmpl['name'], $tmpl['message']);
    }
    $razem = 0;
    $ilosc = 0;
    $tresc = '';
    foreach ($customers as $customer) {
        $id = $customer['id'];
        $balance = $LMS->GetCustomerBalance($id);
        $covenant = 0;
        $oplata = 0;
        $assignments = $LMS->GetCustomerAssignments($id, true);
        #if ($customer['id']==2) print_r($assignments);
        if (is_array($assignments)) {
            foreach ($assignments as $assignment) {
                if ($assignment['liabilityid']) {
                    #print $assignment['period']."\n";
开发者ID:kornelek,项目名称:lms,代码行数:31,代码来源:lms-notify.php

示例5: docnumber

            $row['doc_number'] = docnumber($row['number'], $row['template'] ? $row['template'] : '%N/LMS/%Y', $row['cdate']);
            $recipient_mail = $debug_email ? $debug_email : $row['email'];
            if (!$quiet) {
                printf("[deadline] %s (%04d) %s: %s\n", $row['name'], $row['id'], $row['doc_number'], $recipient_mail);
            }
            if (!$debug) {
                send_message($msgid, $row['id'], $recipient_mail, $row['name'], $deadline_subject, parse_data($deadline_message, $row), $host, $port, $user, $pass, $auth);
            }
        }
    }
}
// Debit notes created up to 24 hours ago
if ($notes_message && (empty($types) || in_array('notes', $types))) {
    $documents = $DB->GetAll("SELECT d.id AS docid, c.id, c.pin, d.name,\n\t\td.number, n.template, d.cdate, c.email,\n\t\tCOALESCE(ca.balance, 0) AS balance, v.value\n\t\tFROM documents d\n\t\tJOIN customers c ON (c.id = d.customerid)\n\t\tJOIN (SELECT SUM(value) * -1 AS value, docid\n\t\t\tFROM cash\n\t\t\tGROUP BY docid\n\t\t) v ON (v.docid = d.id)\n\t\tLEFT JOIN numberplans n ON (d.numberplanid = n.id)\n\t\tLEFT JOIN (SELECT SUM(value) AS balance, customerid\n\t\t\tFROM cash\n\t\t\tGROUP BY customerid\n\t\t) ca ON (ca.customerid = d.customerid)\n\t\tWHERE c.email <> '' AND d.type = 5\n\t\t\tAND d.cdate > ?NOW? - 86400");
    if (!empty($documents)) {
        if (!$debug) {
            $msgid = create_message($notes_subject, $notes_message);
        }
        foreach ($documents as $row) {
            $row['doc_number'] = docnumber($row['number'], $row['template'] ? $row['template'] : '%N/LMS/%Y', $row['cdate']);
            $recipient_mail = $debug_email ? $debug_email : $row['email'];
            if (!$quiet) {
                printf("[new debit note] %s (%04d) %s: %s\n", $row['name'], $row['id'], $row['doc_number'], $recipient_mail);
            }
            if (!$debug) {
                send_message($msgid, $row['id'], $recipient_mail, $row['name'], $notes_subject, parse_data($notes_message, $row), $host, $port, $user, $pass, $auth);
            }
        }
    }
}
$DB->Destroy();
开发者ID:oswida,项目名称:lms,代码行数:31,代码来源:lms-notify.php

示例6: create_message

	
	<div class="container">
			
		<form action="login.php" method="POST" role="form">
			<legend>Login</legend>
		
			<div class="form-group">
				<label for="">Username</label>
				<input type="text" class="form-control" name="username">
			</div>

			<div class="form-group">
				<label for="">Password</label>
				<input type="password" class="form-control" name="password">
			</div>
		
			<button type="submit" class="btn btn-primary">Submit</button>
		</form>

		<?php 
if (isset($message)) {
    create_message($message);
}
?>

	</div>

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
	<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</body>
</html>
开发者ID:TheHanif,项目名称:Restaurant-app,代码行数:30,代码来源:login.php

示例7: create_message

            } else {
                $message = create_message(FALSE, "updating user profile");
            }
        } else {
            $message = create_message(FALSE, "updating user profile, no user specified");
        }
        break;
    case 'user_update_password':
        $user_id = $_POST['user_id'];
        $user_name = ace_user_get_display_name_by_id($user_id);
        $user_password = $_POST['password'];
        if ($user_password != '') {
            $success = ace_user_update_password($user_id, $user_password);
            $message = create_message($success, "updating user password for {$user_name}");
        } else {
            $message = create_message(FALSE, "updating user password");
        }
        break;
}
if (isset($message)) {
    $messages[] = $message;
}
unset($message);
switch ($_POST['display']) {
    default:
        $user = ace_user_get_info($_SESSION['user_id']);
        $element = '
                    <p align="center"><strong>Profile</strong></p>';
        $element_column[] = $element;
        $element = '
					<form name="user_profile_form" action="' . _USER_URL_ . '" method="post">
开发者ID:BCTAACCCT,项目名称:ACEITLab,代码行数:31,代码来源:user.php

示例8: get_var

			<?php 
if (is_single()) {
    ?>
			
				<?php 
    $division_id = get_var('id');
    $division = $division_id ? Division::getDivision($division_id) : false;
    $division_name = $division ? $division->getName() : '';
    ?>
				
				<?php 
    if (get_var('action') != 'add' && !$division) {
        ?>
				
					<?php 
        create_message('danger', 'Division does not exist!', true);
        ?>
					
				<?php 
    } else {
        ?>
				
					<form class="form-horizontal" method="post" action="<?php 
        echo get_page_url();
        ?>
">
						<div class="form-group">
							<label class="col-sm-3 control-label" for="name">Division Name</label>
							<div class="col-sm-9">
								<input class="form-control" type="text" id="name" name="division_name" value="<?php 
        echo $division_name;
开发者ID:Hackmastr,项目名称:apps-base,代码行数:31,代码来源:template-admin-division.php

示例9: COUNT

    }
    return 1;
}
//First Queries
$iduser = $_SESSION['id_usuario'];
$sql2 = 'SELECT COUNT(*) FROM tmensajes WHERE id_usuario_destino="' . $iduser . '" AND estado="FALSE";';
$resultado2 = mysql_query($sql2);
$row2 = mysql_fetch_array($resultado2);
$sql3 = 'SELECT * FROM tgrupo';
$resultado3 = mysql_query($sql3);
if (isset($_GET["nuevo_mensaje"])) {
    // Create message
    $usuario_destino = get_parameter("u_destino");
    $subject = get_parameter("subject");
    $mensaje = get_parameter("mensaje");
    create_message($iduser, $usuario_destino, $subject, $mensaje);
}
if (isset($_GET["nuevo_mensaje_g"])) {
    // Create message to groups
    $grupo_destino = get_parameter("g_destino");
    $subject = get_parameter("subject");
    $mensaje = get_parameter("mensaje");
    $sql = 'SELECT id_usuario FROM tusuario_perfil WHERE id_grupo =' . $grupo_destino;
    $result = mysql_query($sql);
    if (mysql_fetch_row($result)) {
        while ($row = mysql_fetch_array($result)) {
            $error = create_message_g($iduser, $row["id_usuario"], $subject, $mensaje);
        }
        if ($error == 0) {
            echo "<h3 class='suc'>" . __('Message successfully sended') . "</h3>";
        } else {
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:message.php

示例10: PHPMailer

 * Initialize and configure PHPMailer
 */
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = $options['email_host'];
$mail->Port = $options['email_port'];
$mail->From = $options['email_from'];
$mail->FromName = $options['email_from_name'];
$mail->SMTPAuth = false;
$mail->Username = $options['email_username'];
$mail->Password = $options['email_password'];
/**
 * Initialize EOS
*/
$eos = new jlawrence\eos\Parser();
/**
 * User Login Management
 */
$usr = new UserLogin();
if (isset($_POST['login'])) {
    $login_result = $usr->login($_POST['user_name'], $_POST['user_password']);
    if (!$login_result) {
        create_message('danger', 'The login information you provided was incorrect. Please try again.');
    } else {
        redirect(get_page_url());
    }
}
if (isset($_POST['logout'])) {
    $usr->logout();
    redirect(get_page_url());
}
开发者ID:Hackmastr,项目名称:apps-base,代码行数:31,代码来源:apps-core.php

示例11: create_message

									</td>
								</tr>			
	
							<?php 
        }
        ?>
							
						</tbody>
					</table>
							
				<?php 
    } else {
        ?>
	
					<?php 
        create_message('info', 'No users have been created yet.', true);
        ?>
		
				<?php 
    }
    ?>
			
			<?php 
}
?>
			
		</div>
	
	</div>

<?php 
开发者ID:Hackmastr,项目名称:apps-base,代码行数:31,代码来源:template-admin-user.php

示例12: email_message

            $requestid = $mysqli->insert_id;
            //Email the requester with information
            $query = "SELECT * FROM achievementList WHERE id = {$achievement}";
            $result = $mysqli->query($query);
            $row = $result->fetch_assoc();
            $userrow['name'] = $row['name'];
            $userrow['level'] = $level;
            email_message('Achievement Request', $userrow['onid'] . '@oregonstate.edu', create_message('./emails/request.eml', $userrow));
            //Identify reviewers
            $query = "SELECT DISTINCT users.* FROM users INNER JOIN achievements ON achievements.userid = users.id INNER JOIN levels ON levels.id = achievements.levelid WHERE achievements.achievementid = {$achievement} AND levels.level >= {$level} GROUP BY users.id LIMIT 5";
            //echo $query . '<BR>';
            $result = $mysqli->query($query);
            while ($row = $result->fetch_assoc()) {
                //echo 'Emailing: ' . $row['username'] . '<BR>';
                $userrow['reviewername'] = $row['username'];
                if (email_message('Achievement Review Request', $row['onid'] . '@oregonstate.edu', create_message('./emails/committee.eml', $userrow)) == 0) {
                    // It worked
                    $query = "INSERT INTO reviews (requestid, reviewer, emaileddate) VALUES ({$requestid}, " . $row['id'] . ", NOW())";
                    $mysqli->query($query);
                }
            }
        }
    }
}
if (isset($_REQUEST['btn-give'])) {
    $achievement = mysqli_real_escape_string($mysqli, $_REQUEST['giveachievement']);
    $level = mysqli_real_escape_string($mysqli, $_REQUEST['givelevel']);
    $employeeid = mysqli_real_escape_string($mysqli, $_REQUEST['employee']);
    addachievement($mysqli, $achievement, $level, $employeeid);
}
if (isset($_REQUEST['btn-endorse'])) {
开发者ID:bitschift,项目名称:CollabAchievements,代码行数:31,代码来源:home.php

示例13: ini_set

<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once '../phpfunctions.php';
include_once '../dbconnect.php';
if (isset($_REQUEST['room'])) {
    if ($_REQUEST['room'] != 0) {
        // For all users, currently in room, send email.
        $query = "SELECT clock.*, users.onid, users.firstname, rooms.name FROM `clock` INNER JOIN `users` ON clock.userid = users.id INNER JOIN `rooms` ON rooms.id = clock.roomid WHERE `timeout` = '0000-00-00 00:00:00'";
        $result = $mysqli->query($query);
        //echo $query . '<BR>';
        while ($row = $result->fetch_assoc()) {
            email_message('Test Message', $row['onid'] . '@oregonstate.edu', create_message('../emails/inroom.eml', $row));
        }
        echo '<h1> SUCCESS </h1>';
    }
}
开发者ID:bitschift,项目名称:CollabAchievements,代码行数:19,代码来源:hall.php

示例14: ace_vm_get_display_name_by_id

    case 'vm_revert_to_snapshot':
        if (isset($_POST['vm_id'], $_POST['vm_snapshot_instance'])) {
            $vm_display_name = ace_vm_get_display_name_by_id($_POST['vm_id']);
            $success = ace_vm_snapshot_revert($_POST['vm_id'], $_POST['vm_snapshot_instance']);
            $message = create_message($success, "reverting to snapshot of {$vm_display_name}");
        } else {
            $message = create_message(FALSE, "reverting to snapshot, no snapshot specified");
        }
        break;
    case 'vm_delete_a_snapshot':
        if (isset($_POST['vm_id'], $_POST['vm_snapshot_instance'])) {
            $vm_display_name = ace_vm_get_display_name_by_id($_POST['vm_id']);
            $success = ace_vm_snapshot_delete($_POST['vm_id'], $_POST['vm_snapshot_instance']);
            $message = create_message($success, "deleting snapshot from {$vm_display_name}");
        } else {
            $message = create_message(FALSE, "deleting snapshot, no snapshot specified");
        }
}
if (isset($message)) {
    $messages[] = $message;
}
unset($message);
# END COMMAND PROCESSING
# BEGIN PAGE DATA
$nonce = rand();
$lab_age_display = '';
$lab_age_maximum = '';
$lab_state = FALSE;
$lab_is_published = FALSE;
if (isset($lab_id) && $lab_id != 'null' && $lab_id != NULL) {
    $valid_lab_selected = TRUE;
开发者ID:BCTAACCCT,项目名称:ACEITLab,代码行数:31,代码来源:lab.php

示例15: addachievement

function addachievement($mysqli, $achievement, $level, $id)
{
    $empRes = $mysqli->query("SELECT achievements.*, levels.level FROM achievements INNER JOIN levels ON levels.id = achievements.levelid WHERE userid='{$id}'");
    //echo $query .'<BR>';
    $empAch = array();
    while ($empRow = $empRes->fetch_array(MYSQLI_ASSOC)) {
        $empAch[] = $empRow;
    }
    $done = false;
    foreach ($empAch as $row) {
        if ($row['achievementid'] == $achievement) {
            //Already has at least one level
            if ($level == $row['level']) {
                // Already have this exact level
                echo "<script>alert('Already has this achievement at this level.');</script>";
                $done = true;
            } else {
                if ($level < $row['level']) {
                    echo "<script>alert('Already has this achievement at a higher level. Adding this anyways.');</script>";
                    $done = false;
                } else {
                    $done = false;
                }
            }
        }
    }
    if ($done == false) {
        // We need to add this to
        $query = "SELECT * FROM levels WHERE achievementid = {$achievement} AND level = {$level}";
        $levelRes = $mysqli->query($query);
        //echo $query . '<BR>';
        $levelRow = $levelRes->fetch_array(MYSQLI_ASSOC);
        $query = "INSERT INTO `achievements` (achievementid, levelid, userid) VALUES ({$achievement}, " . $levelRow['id'] . ", {$id})";
        //echo $query . '<BR>';
        $mysqli->query($query);
        //Need to send confirmation email here
        $query = "SELECT * FROM users WHERE id = {$id}";
        $result = $mysqli->query($query);
        $row = $result->fetch_assoc();
        $query = "SELECT * FROM achievementList WHERE id = {$achievement}";
        $result = $mysqli->query($query);
        $temprow = $result->fetch_assoc();
        $row['name'] = $temprow['name'];
        $row['level'] = $level;
        email_message('Achievement ' . $row['name'] . ' Approved', $row['onid'] . '@oregonstate.edu', create_message('./emails/approved.eml', $row));
    }
}
开发者ID:bitschift,项目名称:CollabAchievements,代码行数:47,代码来源:phpfunctions.php


注:本文中的create_message函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。