/** * Adds a message into queue for email. Recipient's full name is optional * @param $campaign_id * @param string $email * @param string $full_name * @param array $replace * @return int OR false */ function add_message_into_queue_for_email($campaign_id, $email, $full_name='', $replace = array()) { $replace_str = ( $replace && is_array($replace) ) ? serialize($replace) : ''; he_database::query(he_database::placeholder("INSERT INTO se_he_mass_mailing_queue SET campaign_id=?, email='?', full_name='?', `replace`='?'", intval($campaign_id), $email, $full_name, $replace_str)); return he_database::insert_id(); }
function new_upload($instance_id = 0, $filename = '', $title = '') { global $actions; $query = he_database::placeholder("INSERT INTO `se_he_uploads` \r\n (\r\n `uploads_instance_id`, \r\n `uploads_instance_type`, \r\n `uploads_user_id`,\r\n `uploads_datecreated`,\r\n `uploads_title`, \r\n `uploads_filename`\r\n )\r\n VALUES (?, '?', ?, ?, '?', '?')", $instance_id, $this->instance_type, $this->user_id, time(), $title, $filename); he_database::query($query); return he_database::insert_id(); }
function add_youtube_video($video_code, $video_title, $video_desc, $video_search, $video_privacy, $video_comments) { global $user; $time = time(); $query = he_database::placeholder("INSERT INTO `se_videos` (\r\n `video_user_id`,\r\n\t\t\t`video_datecreated`,\r\n\t\t\t`video_title`,\r\n\t\t\t`video_desc`,\r\n\t\t\t`video_search`,\r\n\t\t\t`video_privacy`,\r\n\t\t\t`video_comments`, \r\n\t\t\t`video_type`,\r\n\t\t\t`video_dateupdated`,\r\n `video_youtube_code`,\r\n `video_uploaded`,\r\n `video_is_converted` \r\n ) VALUES ( ?, ?, '?', '?', ?, ?, ?, 1, ?, '?', 1, 1 )", $user->user_info['user_id'], $time, $video_title, $video_desc, $video_search, $video_privacy, $video_comments, $time, $video_code); he_database::query($query); return he_database::insert_id(); }
function add_cat($label) { $label = trim($label); if (!$label) { return false; } $query = he_database::placeholder("INSERT INTO `se_he_quiz_cat` ( `label` ) VALUES( '?' )", $label); he_database::query($query); return he_database::insert_id(); }