<?php
/***********************************************************
* Source Copyright 2014 Author                             *
* Unauthorized reproduction is not allowed                 *
* Author: JPK Software Solutions Pvt. Ltd.                 *
* Email: sales@visionhelpdesk.com                          *
* Owner: www.visionhelpdesk.com                            *
* Version: V4.0.0                                          *
************************************************************

IMPORTANT
Stored in database fields
Facebook Used Fields ($operation['vis_login_type']=16)
1. APP ID - host_name
2. SECRETE KEY - user_name 

Twitter Used Fields ($operation['vis_login_type']=17)
1. APP ID - host_name
2. SECRETE KEY  - user_name
3. REDIRECTION URL - db_prefix 

Gmail Used Fields ($operation['vis_login_type']=18)
1. APP ID - host_name
2. SECRETE KEY  - user_name
3. REDIRECTION URL - db_prefix 
4. DEVELOPER KEY - db_name

*/?>
<? global $vis_language; ?>
<?php if($operation['vis_login_type']==16){?>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTAPPID']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_host" id="vis_host" value="<? echo $smtp_details['host_name']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTAPPSECRETE']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['user_name']; ?>">
	</div>
</div>
		<input class="form-control input-sm" type="hidden" name="vis_prefix" id="vis_prefix" value="facebook">
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTREDIRECTURL']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_password" id="vis_password" value="<? echo $smtp_details['db_password']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-1">
		<label class="switch <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
		  <input type="checkbox" name="vis_status"  id="vis_status" <? if($smtp_details['is_enabled']==1 || !isset($smtp_details['is_enabled'])) echo ' checked="checked"'; ?>> 
		  <span ></span>
		</label>
	</div>
</div>
<?php }elseif($operation['vis_login_type']==17){?>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTCONSUMERKEY']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_host" id="vis_host" value="<? echo $smtp_details['host_name']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTCONSUMERSECRETE']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['user_name']; ?>">
	</div>
</div>
	<input class="form-control input-sm" type="hidden" name="vis_prefix" id="vis_prefix" value="twitter">
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTCALLBACKURL']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_password" id="vis_password" value="<? echo $smtp_details['db_password']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-1">
		<label class="switch <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
		  <input type="checkbox" name="vis_status"  id="vis_status" <? if($smtp_details['is_enabled']==1 || !isset($smtp_details['is_enabled'])) echo ' checked="checked"'; ?>> 
		  <span ></span>
		</label>
	</div>
</div>
<?php }elseif($operation['vis_login_type']==18){?>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTCLIENTID']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_host" id="vis_host" value="<? echo $smtp_details['host_name']; ?>">
	</div>
</div>
	<input class="form-control input-sm" type="hidden" name="vis_prefix" id="vis_prefix" value="gmail">
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTCLIENTSECRETE']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['user_name']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTKEY']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_dbname" id="vis_dbname" value="<? echo $smtp_details['db_name']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTREDIRECTURL']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_password" id="vis_password" value="<? echo $smtp_details['db_password']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-1">
		<label class="switch <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
		  <input type="checkbox" name="vis_status"  id="vis_status" <? if($smtp_details['is_enabled']==1 || !isset($smtp_details['is_enabled'])) echo ' checked="checked"'; ?>> 
		  <span ></span>
		</label>
	</div>
</div>
<?php }elseif($operation['vis_login_type']==19){?>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTCLIENTID']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_host" id="vis_host" value="<? echo $smtp_details['host_name']; ?>">
	</div>
</div>
	<input class="form-control input-sm" type="hidden" name="vis_prefix" id="vis_prefix" value="gmail">
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTCLIENTSECRETE']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['user_name']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTREDIRECTURL']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_password" id="vis_password" value="<? echo $smtp_details['db_password']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-1">
		<label class="switch <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
		  <input type="checkbox" name="vis_status"  id="vis_status" <? if($smtp_details['is_enabled']==1 || !isset($smtp_details['is_enabled'])) echo ' checked="checked"'; ?>> 
		  <span ></span>
		</label>
	</div>
</div>
<?php }elseif($operation['vis_login_type']==21){?>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTAPIID']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_host" id="vis_host" value="<? echo $smtp_details['host_name']; ?>">
	</div>
</div>
	<input class="form-control input-sm" type="hidden" name="vis_prefix" id="vis_prefix" value="gmail">
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTAPIKEY']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['user_name']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTAPI'].' '.$vis_language['TXTURL']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_password" id="vis_password" value="<? echo $smtp_details['db_password']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-1">
		<label class="switch <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
		  <input type="checkbox" name="vis_status"  id="vis_status" <? if($smtp_details['is_enabled']==1 || !isset($smtp_details['is_enabled'])) echo ' checked="checked"'; ?>> 
		  <span ></span>
		</label>
	</div>
</div>
<?php }elseif($operation['vis_login_type']==23){?>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTAPIID']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_host" id="vis_host" value="<? echo $smtp_details['host_name']; ?>">
	</div>
</div>
	<input class="form-control input-sm" type="hidden" name="vis_prefix" id="vis_prefix" value="gmail">
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTAPPSECRETE']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['user_name']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTREDIRECTURL']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_password" id="vis_password" value="<? echo $smtp_details['db_password']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-1">
		<label class="switch <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
		  <input type="checkbox" name="vis_status"  id="vis_status" <? if($smtp_details['is_enabled']==1 || !isset($smtp_details['is_enabled'])) echo ' checked="checked"'; ?>> 
		  <span ></span>
		</label>
	</div>
</div>
<?php }elseif($operation['vis_login_type']==20){?>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTSUGARSITEURL']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_host" id="vis_host" value="<? echo $smtp_details['host_name']; ?>">
	</div>
</div>
<!--
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTUSERNAME']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['user_name']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTPASSWORD']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_password" id="vis_password" value="<? echo $smtp_details['db_password']; ?>">
	</div>
</div>-->
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-1">
		<label class="switch <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
		  <input type="checkbox" name="vis_status"  id="vis_status" <? if($smtp_details['is_enabled']==1 || !isset($smtp_details['is_enabled'])) echo ' checked="checked"'; ?>> 
		  <span ></span>
		</label>
	</div>
</div>
<?php } elseif($operation['vis_login_type']==26){?>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTCLIENTID']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_host" id="vis_host" value="<? echo $smtp_details['host_name']; ?>">
	</div>
</div>
	<!-- <input class="form-control input-sm" type="hidden" name="vis_prefix" id="vis_prefix" value="gmail"> -->
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo  $vis_language['TXTTENANT']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['user_name']; ?>">
</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTREDIRECTURL']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text" name="vis_password" id="vis_password" value="<? echo $smtp_details['db_password']; ?>">
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-1">	
		<label class="switch <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
		  <input type="checkbox" name="vis_status"  id="vis_status" <? if($smtp_details['is_enabled']==1 || !isset($smtp_details['is_enabled'])) echo ' checked="checked"'; ?>> 
		  <span ></span>
		</label>
	</div>
</div>
<?php } ?>
<div class="line b-b line-lg pull-in">
</div>
<br/>
<div class="form-group">
	<div class="col-sm-4 col-sm-offset-2">
		<button type="button" class="btn btn-primary" onclick="$('#vis_workpanel_div').visExecution('submit_form', {'vis_module':'subsetting', 'vis_operation':'update_single_login', 'vis_form':'vis_single_form','login_type_name':'<?=$operation['vis_login_name']?>'})"><? echo $vis_language['TXTSAVE']; ?></button>
                <? if($smtp_details !=-1 && !empty($smtp_details)) {?>  
                    <button type="button" class="btn btn-primary m-l" onclick="$('#vis_workpanel_div').visExecution('submit_form', {'vis_module':'setting', 'vis_operation':'delete_single_login_<?= $operation['vis_login_type']; ?>', 'vis_form':'vis_single_form','login_type_name':'<?=$operation['vis_login_name']?>'})"><? echo $vis_language['TXTDELETE']; ?></button>
                <? } ?>
	</div>	
</div>
