本文整理匯總了PHP中Artist::add方法的典型用法代碼示例。如果您正苦於以下問題:PHP Artist::add方法的具體用法?PHP Artist::add怎麽用?PHP Artist::add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Artist
的用法示例。
在下文中一共展示了Artist::add方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addslashes
$arrData['phone'] = @addslashes($_POST['artist_phone']);
$arrData['email'] = addslashes($_POST['artist_email']);
$arrData['country'] = addslashes(ucwords($_POST['artist_country']));
$arrData['website'] = addslashes(ucwords($_POST['artist_url']));
$arrData['manager'] = addslashes(ucwords($_POST['artist_manager']));
$arrData['administration'] = addslashes(ucwords($_POST['artist_administration']));
$arrData['licensing'] = addslashes(ucwords($_POST['artist_licensing']));
$arrData['status'] = addslashes(ucwords($_POST['artist_status']));
$arrData['enable_profile'] = addslashes($_POST['enable_profile']);
$arrData['youtube_channel'] = addslashes($_POST['youtube_channel']);
$arrData['soundcloud_username'] = addslashes($_POST['soundcloud_username']);
$arrData['itunes_id'] = addslashes($_POST['itunes_id']);
$arrData['created_date'] = date('Y-m-d H:i:s');
$action = 'add';
if (empty($_POST['id'])) {
$insert = $artist->add($arrData);
if ($insert) {
//insert properties like category, genre, field
$artist->add_prop($artist_prop, $insert, 'artist');
$cover = '';
$picture = '';
if ($_FILES['artist_cover']['name'] != '') {
$cover = 'artistcover_' . $insert . '.jpg';
saveResizeImage($_FILES['artist_cover'], $insert, 'artistcover');
}
if ($_FILES['artist_picture']['name'] != '') {
$picture = 'artistpic_' . $insert . '.jpg';
saveResizeImage($_FILES['artist_picture'], $insert, 'artistpic');
}
if ($_FILES['artist_picture1']['name'] != '') {
$picture = 'artistpic1_' . $insert . '.jpg';