This commit is contained in:
botanic 2014-09-14 13:09:00 -07:00
parent 8e40fe8210
commit 3cd38fdbdb
3 changed files with 79 additions and 12 deletions

View file

@ -18,6 +18,8 @@ class Helpers {
*/ */
public static function loadTemplate( $template, $vars = array (), $returnHTML = false ) public static function loadTemplate( $template, $vars = array (), $returnHTML = false )
{ {
error_log(print_r($_GET,true));
error_log(print_r($_POST,true));
global $AMS_LIB; global $AMS_LIB;
global $SITEBASE; global $SITEBASE;
global $AMS_TRANS; global $AMS_TRANS;

View file

@ -71,7 +71,7 @@ function domain_management_hook_get_db()
try { try {
$dbs = new DBLayer( 'shard' ); $dbs = new DBLayer( 'shard' );
$dbs->update("domain", Array( 'domain_name' => $_POST['domain_name'], 'patch_version' => $_POST['patch_version'],'backup_patch_url' => $_POST['backup_patch_url'],'patch_urls' => $_POST['patch_urls'],'login_address' => $_POST['login_address'],'session_manager_address' => $_POST['session_manager_address'],'ring_db_name' => $_POST['ring_db_name'],'web_host' => $_POST['web_host'],'web_host_php' => $_POST['web_host_php'],'description' => $_POST['description'],),'`domain_id` = '.$_GET['edit_domain']); $dbs->update("domain", Array( 'domain_name' => $_POST['domain_name'], 'status' => $_POST['status'], 'patch_version' => $_POST['patch_version'],'backup_patch_url' => $_POST['backup_patch_url'],'patch_urls' => $_POST['patch_urls'],'login_address' => $_POST['login_address'],'session_manager_address' => $_POST['session_manager_address'],'ring_db_name' => $_POST['ring_db_name'],'web_host' => $_POST['web_host'],'web_host_php' => $_POST['web_host_php'],'description' => $_POST['description'],),'`domain_id` = '.$_GET['edit_domain']);
} }
catch ( Exception $e ) { catch ( Exception $e ) {
@ -123,3 +123,15 @@ function domain_management_hook_return_global()
global $domain_management_return_set; global $domain_management_return_set;
return $domain_management_return_set; return $domain_management_return_set;
} }
function api_key_management_hook_activate()
{
$dbl = new DBLayer( "lib" );
$sql = "INSERT INTO `settings` (Setting)
SELECT 'Domain_Auto_Add' FROM DUAL
WHERE NOT EXISTS
(SELECT Setting FROM settings WHERE Setting='Domain_Auto_Add');";
$dbl -> executeWithoutParams( $sql );
}

View file

@ -52,13 +52,13 @@
</div> </div>
</div><!--/span--> </div><!--/span-->
<div class="box col-md-3"> <div class="box col-md-3">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading" data-original-title=""> <div class="panel-heading" data-original-title="">
<span class="icon-pencil"></span> Modify Domain Settings <span class="icon-pencil"></span> Modify Domain Settings
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="row-fluid"> <div class="row-fluid">
<form id="modifyDomain" class="form-vertical" method="post" action="index.php?page=layout_plugin&name=Domain_Management&edit_domain={$hook_info['Domain_Management']['domains']['0']['domain_id']}&ModifyDomain=1"> <form id="modifyDomain" class="form-vertical" method="post" action="index.php?page=layout_plugin&name=Domain_Management&edit_domain={$hook_info['Domain_Management']['domains']['0']['domain_id']}&ModifyDomain=1">
@ -80,21 +80,19 @@
<input type="text" id="domain_name" name="domain_name" value="{$hook_info['Domain_Management']['domains']['0']['domain_name']}"> <input type="text" id="domain_name" name="domain_name" value="{$hook_info['Domain_Management']['domains']['0']['domain_name']}">
</div> </div>
</div> </div>
</div> </div>
<div class="control-group" style="display: inline-block; "> <div class="control-group" style="display: inline-block; ">
<label class="control-label">Domain Status</label> <label class="control-label">Domain Status</label>
<div class="controls"> <div class="controls">
<div class="input-prepend"> <select class="form-control" name="status">
<select id="status" multiple class="form-control" form="modifyDomain">
<option value="ds_close" {if {$hook_info['Domain_Management']['domains']['0']['status']} eq "ds_close"}selected{/if}>ds_close</option> <option value="ds_close" {if {$hook_info['Domain_Management']['domains']['0']['status']} eq "ds_close"}selected{/if}>ds_close</option>
<option value="ds_dev" {if {$hook_info['Domain_Management']['domains']['0']['status']} eq "ds_dev"}selected{/if}>ds_dev</option> <option value="ds_dev" {if {$hook_info['Domain_Management']['domains']['0']['status']} eq "ds_dev"}selected{/if}>ds_dev</option>
<option value="ds_restricted" {if {$hook_info['Domain_Management']['domains']['0']['status']} eq "ds_restricted"}selected{/if}>ds_restricted</option> <option value="ds_restricted" {if {$hook_info['Domain_Management']['domains']['0']['status']} eq "ds_restricted"}selected{/if}>ds_restricted</option>
<option value="ds_open" {if {$hook_info['Domain_Management']['domains']['0']['status']} eq "ds_open"}selected{/if}>ds_open</option> <option value="ds_open" {if {$hook_info['Domain_Management']['domains']['0']['status']} eq "ds_open"}selected{/if}>ds_open</option>
</select> </select>
</div> </div>
</div> </div>
</div>
<div class="control-group" style="display: inline-block; "> <div class="control-group" style="display: inline-block; ">
<label class="control-label">Patch Version</label> <label class="control-label">Patch Version</label>
@ -196,6 +194,61 @@
</div> </div>
</div> </div>
<div class="box col-md-9">
</div>
<div class="box col-md-3">
<div class="panel panel-default">
<div class="panel-heading" data-original-title="">
<span class="icon-pencil"></span> Permission Settings
</div>
<div class="panel-body">
<div class="row-fluid">
<form id="multiselectForm" method="post" class="form-horizontal" action="test.php?page=layout_plugin&name=Domain_Management&edit_domain={$hook_info['Domain_Management']['domains']['0']['domain_id']}&ModifyPermission=1">
<div class="form-group">
<label class="col-lg-3 control-label">Gender</label>
<div class="col-lg-5">
<select class="form-control" name="gender">
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Browser</label>
<div class="col-lg-5">
<select class="form-control" name="browsers" multiple>
<option value="chrome">Google Chrome</option>
<option value="firefox">Firefox</option>
<option value="ie">IE</option>
<option value="safari">Safari</option>
<option value="opera">Opera</option>
<option value="other">Other</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-lg-5 col-lg-offset-3">
<button type="submit" class="btn btn-default">Validate</button>
</div>
</div>
</form>
{if isset($RESULT_OF_MODIFYING) and $RESULT_OF_MODIFYING eq "SUCCESS"}
<div class="alert alert-success">
{$modify_mail_of_group_success}
</div>
{/if}
</div>
</div>
</div>
</div><!--/row--> </div><!--/row-->
{else} {else}