本文整理汇总了PHP中db_album_get_c_album4c_album_id函数的典型用法代码示例。如果您正苦于以下问题:PHP db_album_get_c_album4c_album_id函数的具体用法?PHP db_album_get_c_album4c_album_id怎么用?PHP db_album_get_c_album4c_album_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了db_album_get_c_album4c_album_id函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$target_c_album_image_id = $requests['target_c_album_image_id'];
// ----------
$target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id);
$target_c_album_id = $target_c_album_image['c_album_id'];
$album = db_album_get_c_album4c_album_id($target_c_album_id);
if ($album['c_member_id'] != $u) {
handle_kengen_error();
}
// target が指定されていない
if (!$target_c_album_image_id) {
openpne_redirect('pc', 'page_h_err_fh_album');
}
// target の写真が存在しない
if (!p_common_is_active_c_album_image_id($target_c_album_image_id)) {
openpne_redirect('pc', 'page_h_err_fh_album');
}
$this->set('inc_navi', fetch_inc_navi("h"));
$this->set('target_c_album_image', $target_c_album_image);
$form_val = array("target_c_album_id" => $target_c_album_id, "target_c_album_image_id" => $target_c_album_image_id);
$this->set("form_val", $form_val);
return 'success';
}
示例2: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$form_val['image_description1'] = $requests['image_description1'];
$form_val['image_description2'] = $requests['image_description2'];
$form_val['image_description3'] = $requests['image_description3'];
$form_val['image_description4'] = $requests['image_description4'];
$form_val['image_description5'] = $requests['image_description5'];
$target_c_album_id = $requests['target_c_album_id'];
//--- 権限チェック
$album = db_album_get_c_album4c_album_id($target_c_album_id);
if ($album['c_member_id'] != $u) {
handle_kengen_error();
}
$this->set('inc_navi', fetch_inc_navi("h"));
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
$this->set('album_subject', $c_album['subject']);
$this->set('target_c_album_id', $target_c_album_id);
$this->set("form_val", $form_val);
//写真データ一時ファイル削除
$sessid = session_id();
t_image_clear_tmp($sessid);
return 'success';
}
示例3: execute
function execute($requests)
{
$tail = $GLOBALS['KTAI_URL_TAIL'];
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
// --- リクエスト変数
$target_c_album_image_id = $requests['target_c_album_image_id'];
$image_description = $requests['description'];
// ----------
if (is_null($image_description) || $image_description === '') {
$p = array('target_c_album_image_id' => $target_c_album_image_id, 'msg' => 51);
openpne_redirect('ktai', 'page_h_album_image_edit', $p);
}
$target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id);
//targetのアルバム写真が存在しない
if (!$target_c_album_image) {
openpne_redirect('ktai', 'page_h_err_fh_album');
}
$target_c_album_id = $target_c_album_image['c_album_id'];
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
//targetのアルバムが存在しない
if (!$c_album) {
openpne_redirect('ktai', 'page_h_err_fh_album');
}
if ($c_album['c_member_id'] != $u) {
handle_kengen_error();
}
//---
$image_filename = $target_c_album_image['image_filename'];
$filesize = $target_c_album_image['filesize'];
db_album_update_c_album_image($target_c_album_image_id, $image_filename, $image_description, $filesize);
$p = array('target_c_album_image_id' => $target_c_album_image_id);
openpne_redirect('ktai', 'page_fh_album_image_show', $p);
}
示例4: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$v = array();
$target_c_album_ids = $requests['target_c_album_ids'];
// アルバムが選択されていない場合はエラー
if (!$target_c_album_ids) {
admin_client_redirect('edit_album_list', "アルバムが選択されていません");
}
$id_ary = split(":", $target_c_album_ids);
$album_list = array();
foreach ($id_ary as $id) {
$album = db_album_get_c_album4c_album_id($id);
if (!$album) {
admin_client_redirect('edit_album_list', '指定されたアルバムは存在しません');
}
$member = db_member_c_member4c_member_id($album['c_member_id']);
$album['c_member'] = $member;
array_push($album_list, $album);
}
$this->set('album_list', $album_list);
$this->set('target_c_album_ids', $target_c_album_ids);
$this->set($v);
return 'success';
}
示例5: execute
function execute($requests)
{
$tail = $GLOBALS['KTAI_URL_TAIL'];
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
// --- リクエスト変数
$target_c_album_image_id = $requests['target_c_album_image_id'];
// ----------
$target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id);
//targetのアルバム写真が存在しない
if (!$target_c_album_image) {
openpne_redirect('ktai', 'page_h_err_fh_album');
}
$target_c_album_id = $target_c_album_image['c_album_id'];
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
//targetのアルバムが存在しない
if (!$c_album) {
openpne_redirect('ktai', 'page_h_err_fh_album');
}
if ($c_album['c_member_id'] != $u) {
handle_kengen_error();
}
//---
db_album_delete_c_album_image($target_c_album_image_id, $u);
$p = array('target_c_album_id' => $target_c_album_id);
openpne_redirect('ktai', 'page_fh_album_image_list', $p);
}
示例6: execute
function execute($requests)
{
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
// --- リクエスト変数
$target_c_album_id = $requests['target_c_album_id'];
$subject = $requests['subject'];
$description = $requests['description'];
$public_flag = $requests['public_flag'];
// ----------
if ($target_c_album_id) {
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
if ($c_album['c_member_id'] != $u) {
handle_kengen_error();
}
// 内容の不備によるリダイレクト時・編集修正時は値を上書き
if ($requests['msg'] || !(is_null($subject) || is_null($description))) {
$c_album['subject'] = $subject;
$c_album['description'] = $description;
$c_album['public_flag'] = $public_flag;
}
} else {
$c_album['subject'] = $subject;
$c_album['description'] = $description;
$c_album['public_flag'] = $public_flag ? $public_flag : "public";
}
$this->set('target_c_album', $c_album);
if (MAIL_ADDRESS_HASHED) {
$mail_address = "a{$u}-" . t_get_user_hash($u) . "@" . MAIL_SERVER_DOMAIN;
} else {
$mail_address = "album" . "@" . MAIL_SERVER_DOMAIN;
}
$mail_address = MAIL_ADDRESS_PREFIX . $mail_address;
$this->set('album_address', $mail_address);
return 'success';
}
示例7: execute
function execute($requests)
{
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$target_c_album_id = $requests['target_c_album_id'];
// ----------
if (!p_common_is_active_c_album_id($target_c_album_id)) {
util_send_header_internal_server_error();
}
//--- 権限チェック
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
$target_c_member_id = $c_album['c_member_id'];
$c_album['c_member'] = db_member_c_member4c_member_id_LIGHT($target_c_member_id);
$c_album['album_cover_image'] = util_get_img_url($c_album['album_cover_image'], 180, 180);
$c_album['word_my_friend'] = WORD_MY_FRIEND;
if ($u != $target_c_member_id) {
// メンバーが存在しない
if (!$c_album['c_member']) {
util_send_header_internal_server_error();
}
// check public_flag
if (!pne_check_album_public_flag($target_c_album_id, $u)) {
util_send_header_internal_server_error();
}
// アクセスブロック設定
if (db_member_is_access_block($u, $target_c_member_id)) {
util_send_header_internal_server_error();
}
}
//---
util_output_xml4array($c_album, 'c_album');
}
示例8: execute
function execute($requests)
{
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
// --- リクエスト変数
$target_c_album_id = $requests['target_c_album_id'];
// ----------
$c_member = db_member_c_member4c_member_id($u);
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
if ($c_album['c_member_id'] != $u) {
handle_kengen_error();
}
$this->set('target_c_album', $c_album);
if (OPENPNE_ALBUM_LIMIT) {
$kb = 1024;
$mb = 1048576;
$limit_size = db_album_sum_filesize4c_member_id($u);
$limit_size = OPENPNE_ALBUM_LIMIT * $mb - $limit_size;
$limit_size = floor($limit_size / $kb);
$this->set('album_limit', OPENPNE_ALBUM_LIMIT);
$this->set('limit_size', $limit_size);
}
if (MAIL_ADDRESS_HASHED) {
$mail_address = "ai{$target_c_album_id}-" . t_get_user_hash($u) . '@' . MAIL_SERVER_DOMAIN;
} else {
$mail_address = "ai{$target_c_album_id}" . '@' . MAIL_SERVER_DOMAIN;
}
$mail_address = MAIL_ADDRESS_PREFIX . $mail_address;
$this->set('mail_address', $mail_address);
return 'success';
}
示例9: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$target_c_album_id = $requests['target_c_album_id'];
$page = $requests['page'];
// ----------
$page_size = 20;
$desc = 1;
$target_c_album = db_album_get_c_album4c_album_id($target_c_album_id);
$target_c_member_id = $u;
if ($target_c_member_id != $target_c_album['c_member_id']) {
handle_kengen_error();
}
$this->set('target_c_member_id', $target_c_member_id);
$this->set('target_c_album_id', $target_c_album_id);
$this->set('album_info', $target_c_album);
$this->set("target_member", db_member_c_member4c_member_id($target_c_member_id));
$target_c_album_image = db_album_c_album_image_list4c_album_id($target_c_album_id, $page, $page_size, $desc);
$this->set("target_album_image", $target_c_album_image[0]);
$this->set('is_prev', $target_c_album_image[1]);
$this->set('is_next', $target_c_album_image[2]);
$this->set("total_num", $target_c_album_image[3]);
$this->set('album_list_count', count($target_c_album_image[0]));
$this->set('page', $page);
$this->set('page_size', $page_size);
$view =& $this->getView();
$view->ext_display('h_album_image_insert_dialog.tpl');
exit;
}
示例10: execute
function execute($requests)
{
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$target_c_album_image_id = $requests['target_c_album_image_id'];
// ----------
if (!p_common_is_active_c_album_image_id($target_c_album_image_id)) {
util_send_header_internal_server_error();
}
$c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id);
$c_album_id = $c_album_image['c_album_id'];
if (!p_common_is_active_c_album_id($c_album_id)) {
util_send_header_internal_server_error();
}
$c_album = db_album_get_c_album4c_album_id($c_album_id);
$target_c_member_id = $c_album['c_member_id'];
if ($u != $target_c_member_id) {
// メンバーが存在しない
if (!db_member_is_active_c_member_id($target_c_member_id)) {
util_send_header_internal_server_error();
}
// check public_flag
if (!pne_check_album_public_flag($c_album_id, $u)) {
util_send_header_internal_server_error();
}
// アクセスブロック設定
if (db_member_is_access_block($u, $target_c_member_id)) {
util_send_header_internal_server_error();
}
}
$c_album_image['image_filename'] = util_get_img_url($c_album_image['image_filename'], 180, 180);
//---
util_output_xml4array($c_album_image, 'c_album_image');
}
示例11: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$target_c_album_id = $requests['target_c_album_id'];
$subject = $requests['subject'];
$description = $requests['description'];
$public_flag = $requests['public_flag'];
// ----------
//--- 権限チェック
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
if ($c_album['c_member_id'] != $u) {
handle_kengen_error();
}
//---
//写真データ一時ファイル削除
$sessid = session_id();
t_image_clear_tmp($sessid);
$upfiles = array(1 => $_FILES['upfile_1']);
$tmpfiles = array(1 => '');
$filesize = 0;
foreach ($upfiles as $key => $upfile) {
if ($upfile['error'] !== UPLOAD_ERR_NO_FILE) {
if (!($image = t_check_image($upfile))) {
$_REQUEST['msg'] = '写真は' . IMAGE_MAX_FILESIZE . 'KB以内のGIF・JPEG・PNGにしてください';
openpne_forward('pc', 'page', 'h_album_cover_edit');
exit;
} else {
$filesize += $image['size'];
$tmpfiles[$key] = t_image_save2tmp($upfile, $sessid, "a_{$target_c_album_id}_{$key}", $image['format']);
}
}
}
// 画像アップロード可能サイズチェック
if ($filesize) {
$del_file = array();
if ($c_album['album_cover_image']) {
$del_file[] = $c_album['album_cover_image'];
}
$result = util_image_check_change_image_upload($filesize, $del_file, $u, 'other');
if ($result) {
$sessid = session_id();
t_image_clear_tmp($sessid);
$_REQUEST['msg'] = util_image_get_upload_err_msg($result);
openpne_forward('pc', 'page', 'h_album_cover_edit');
exit;
}
}
$this->set('inc_navi', fetch_inc_navi("h"));
$form_val = array("target_c_album_id" => $target_c_album_id, "subject" => $subject, "description" => $description, "public_flag" => $public_flag, "upfile_1" => $_FILES['upfile_1'], "tmpfile_1" => $tmpfiles[1]);
$this->set("form_val", $form_val);
return 'success';
}
示例12: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$target_c_album_id = $requests['target_c_album_id'];
$album = db_album_get_c_album4c_album_id($target_c_album_id);
if (!$album) {
admin_client_redirect('edit_album_list', '指定されたアルバムは存在しません');
}
db_album_delete_c_album($target_c_album_id);
admin_client_redirect('edit_album_list', 'アルバムを削除しました');
}
示例13: execute
function execute($requests)
{
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
// --- リクエスト変数
$target_c_album_id = $requests['target_c_album_id'];
// ----------
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
if ($c_album['c_member_id'] != $u) {
handle_kengen_error();
}
$this->set('target_c_album', $c_album);
return 'success';
}
示例14: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$target_c_album_image_id = $requests['target_c_album_image_id'];
// ----------
//targetが指定されていない
if (!$target_c_album_image_id) {
openpne_redirect('pc', 'page_h_err_fh_album');
}
//targetのアルバム写真が存在しない
if (!p_common_is_active_c_album_image_id($target_c_album_image_id)) {
openpne_redirect('pc', 'page_h_err_fh_album');
}
$target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id);
$target_c_album_id = $target_c_album_image['c_album_id'];
//targetのアルバムが存在しない
if (!p_common_is_active_c_album_id($target_c_album_id)) {
openpne_redirect('pc', 'page_h_err_fh_album');
}
$target_c_album = db_album_get_c_album4c_album_id($target_c_album_id);
$target_c_member_id = $target_c_album['c_member_id'];
if ($target_c_member_id == $u) {
$type = 'h';
} else {
$type = 'f';
// メンバーが存在しない
if (!db_member_is_active_c_member_id($target_c_member_id)) {
openpne_redirect('pc', 'page_h_err_fh_album');
}
//check public flag
if (!pne_check_album_public_flag($target_c_album_id, $u)) {
openpne_redirect('pc', 'page_h_err_fh_album');
}
// アクセスブロック
if (db_member_is_access_block($u, $target_c_member_id)) {
openpne_redirect('pc', 'page_h_access_block');
}
// あしあとをつける
db_ashiato_insert_c_ashiato($target_c_member_id, $u);
}
$this->set('type', $type);
$this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id));
$this->set('c_album_image', $target_c_album_image);
$this->set('c_album_image_id_prev', db_album_image_c_album_image_id_prev4c_album_id($target_c_album_id, $target_c_album_image_id));
$this->set('c_album_image_id_next', db_album_image_c_album_image_id_next4c_album_id($target_c_album_id, $target_c_album_image_id));
return 'success';
}
示例15: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$target_c_album_id = $requests['target_c_album_id'];
$subject = $requests['subject'];
$description = $requests['description'];
$public_flag = $requests['public_flag'];
$tmpfile_1 = $requests['tmpfile_1'];
// ----------
//--- 権限チェック
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
if ($c_album['c_member_id'] != $u) {
handle_kengen_error();
}
//---
//---画像アップロードサイズチェック
if ($tmpfile_1) {
$del_file = array();
$filesize = util_image_get_c_tmp_filesize4filename("a_{$target_c_album_id}_1", $tmpfile_1);
if ($c_album['album_cover_image']) {
$del_file[] = $c_album['album_cover_image'];
}
$result = util_image_check_change_image_upload($filesize, $del_file, $u, 'other');
if ($result) {
$sessid = session_id();
t_image_clear_tmp($sessid);
$_REQUEST['msg'] = util_image_get_upload_err_msg($result);
openpne_forward('pc', 'page', 'h_album_cover_edit');
exit;
}
}
$filename_1 = '';
$c_album_cover = $c_album['album_cover_image'];
if ($tmpfile_1) {
db_album_image_data_delete($c_album_cover, $u);
$filename_1 = image_insert_c_image4tmp("a_{$target_c_album_id}_1", $tmpfile_1, $u, 'other');
}
$sessid = session_id();
t_image_clear_tmp($sessid);
//アルバムデータの変更
db_album_update_c_album_cover($target_c_album_id, $subject, $description, $filename_1, $public_flag);
$p = array('target_c_album_id' => $target_c_album_id);
openpne_redirect('pc', 'page_fh_album', $p);
}