<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="shortcut icon" href="{$URL_ROOT}images/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<head id="Head1">
{include file='mss_meta.html'}
</head>
{if $complain_insertion==1}
<script language="javascript">
alert("complain added succesfully");
</script>
{/if}
<body>
{include file='mss_head.html'}
<div class="container">
  <div class="row profile">
    <div class="col-md-3"> {include file='usersidebar.html'} </div>
    <div class="col-md-9">
      <div class="profile-content">
       
      
           <div class="panel panel-primary">
          <div class="panel-heading">
            <h2 class="panel-title"> Complain </h2>
          </div>
          
          <div class="panel-body">

            <!--<form method="post">
              <div class="divsec">
                <label for="topic" class="formlabel">Topic</label>
                :
                <input type="text" name="topic" id="topic" class="forminput" >
              </div>
              <div class="divsec">
                <label for="detail" class="formlabel">Complain</label>
                :
                <textarea type="text" rows="5" style="resize:none" name="detail" class="formtextarea" id="detail" ></textarea>
              </div>
              <div class="divsec">
                <input style="margin-left: 34px; margin-top: 26px !important;" type="submit" name="submit" id="submit" value="submit">
              </div>
            </form>--> 

    <form method="post">
                
      <div class="form-group">
        <label>Topic</label>
        <input type="text" name="topic" id="topic" class="form-control input-sm" placeholder="Topic Address">
      </div>
      
      <div class="form-group">
        <label>Complain</label>
        <textarea  name="detail" id="detail" class="form-control input-sm" rows="5" style="resize:none" ></textarea>
      </div>
       
        <input class="btn btn-info btn-block" type="submit" name="submit" id="submit" value="submit">
                  
    </form> 
          
          </div>
            
          </div>
          
           <div class="panel panel-primary">
            <div class="panel-heading">
            <h2 class="panel-title">Previous Complain </h2>
          </div>
          
            <div class="panel-body">
 			
 				
                {foreach from=$mycomplains item=cmpln }
                <span class="pull-right"><i class="glyphicon glyphicon-time"></i> {$cmpln.complain_date}</span> 
                <h3>{$cmpln.topic}</h3> 
                <p>{$cmpln.detail|truncate:150}</p>
                
                <br>
                {if $cmpln.detail|count_characters>150}
                <div class="panel-body">
                        <a href="complain_detail.php?id={$cmpln.id}">Show more</a>
                 </div> 
                {/if}
                
                {if $cmpln.reply!=""}
                <div class="panel panel-success">
                    <div class="panel-heading">
                        <h2 class="panel-title">
                        	Admin Reply
                            <small class="pull-right" style="color:#0F7DB9"><i class="glyphicon glyphicon-time"></i> {$cmpln.reply_date} </small>
                        </h2>
                    </div>
                    <div class="panel-body">
                        <p>{$cmpln.reply}</p>
                    </div>

            

                </div>
                
                {/if}
                <hr>
                
                {/foreach} 	    
            
            
            </div>
            
          </div>
          
        </div>
      
      
      </div>
    </div>
  </div>
</div>
{include file='mss_footer.html'} 
</body>
</html>
