You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
947 B
20 lines
947 B
<?php
|
|
require_once("../../mkt/conn.php");
|
|
function sendSystemNotice($kind, $related_id, $title, $content, $haveread, $permissions, $creater, $create_at, $url){
|
|
global $conn;
|
|
$sql_str = "INSERT INTO notice (kind, related_id, title, content, haveread, permission, url, creater, create_at)
|
|
VALUES (:kind, :related_id, :title, :content, :haveread, :permission, :url,:creater, :create_at)";
|
|
foreach($permissions as $permission){
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':kind', $kind);
|
|
$stmt->bindParam(':related_id', $related_id);
|
|
$stmt->bindParam(':title', $title);
|
|
$stmt->bindParam(':content', $content);
|
|
$stmt->bindParam(':haveread', $haveread);
|
|
$stmt->bindParam(':permission', $permission);
|
|
$stmt->bindParam(':url', $url);
|
|
$stmt->bindParam(':creater', $creater);
|
|
$stmt->bindParam(':create_at', $create_at);
|
|
$stmt->execute();
|
|
}
|
|
}
|