コード例 #1
0
ファイル: btcomments.php プロジェクト: natgeo/kids-myshot
 public function action_insert_ng_comment()
 {
     $item_id = $_POST['comment_id'];
     if ($item_id != NULL || $item_id != '') {
         $comment = $_POST['ng_comment' . $item_id];
         $item_type = ORM::factory('itemtype')->where('name', '=', 'caption')->find();
         $user = Auth::instance()->get_user();
         Helper_NGComment::insert_comment($user->id, $item_id, $item_type->id, $comment);
     } else {
         Message::set(Message::ERROR, 'NG Comment was not added.');
     }
     Request::instance()->redirect('admin/btcomments');
 }
コード例 #2
0
ファイル: index.php プロジェクト: natgeo/kids-myshot
        ?>
</p>
			
            <div class="user_comment">
	            <p class="left">Caption:</p>
	            <p class="right"><?php 
        echo $caption->caption;
        ?>
</p>               
	            <p class="left">NG Comment:</p>
	            <p class="right">
                    <?php 
        echo form::open('admin/btcomments/insert_ng_comment', array('method' => 'post', 'class' => 'right'));
        ?>
                    <?php 
        echo form::textarea('ng_comment' . $caption->id, Helper_NGComment::load_comment($caption->id, 'caption'), array('id' => 'ng_comment' . $caption->id, 'class' => 'ng_comment'));
        ?>
                    <?php 
        echo form::hidden('comment_id', $caption->id);
        ?>
					<?php 
        echo form::submit('submit_ng_comment' . $caption->id, 'Save NG Comment', array('id' => 'submit_ng_comment' . $caption->id, 'class' => 'submit_ng_comment', 'name' => 'submit_ng_comment' . $caption->id));
        ?>
					<?php 
        echo form::close();
        ?>
	            	
                </p>
                
                
                    <p class="left">Email User:</p>             
コード例 #3
0
ファイル: view.php プロジェクト: natgeo/kids-myshot
			</div>
		</div>
	</div> <!-- END photo_container -->
	<div class="photo_info mod_avatar">
        <?php 
echo form::open('/admin/avatars/insert_ng_comment', array('method' => 'post'));
?>
        <div class="title">
          <h2>NG Comments</h2>
          <div class="max_characters counter"></div>
        </div>
          <?php 
echo form::hidden('avatar_id', $avatar->id);
?>
        <?php 
echo form::textarea('ng_comment', Helper_NGComment::load_comment($avatar->id, 'avatar'), array('data-max' => '1000', 'class' => 'word_count'));
?>
        <input type="submit" value="Save NG Comment" class="submit_ng_comment" />
      <?php 
echo form::close();
?>
            
                    <?php 
$avatar_mail_options = Helper_SendEmail::get_avatar_options();
?>
            
                    <?php 
echo form::open('admin/avatars/send_email/' . $avatar->user_id, array('method' => 'post'));
?>
                    <div class="title">
                      <p><strong>Email User: </strong><?php