<div class="row">
    <div class="container">


        <ol class="breadcrumb">
            <li><a href="#">الادارة</a></li>
            <li class="active">نقل قاعدة بيانات</li>
        </ol>






        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <h3 class="panel-title">قاعدة البيانات الجديدة</h3>
            </div>
            <div class="panel-body">



                {for $m=1 to {$k}}

                <form class="form-horizontal" action="transferdatabaseController.php?do=inserttabledata" method="post" >

                    <div class="form-group">
                        <label for="newdatabaseName" class="col-lg-2 control-label">{$tableArabicName{$m}}</label>


                        <div class="col-lg-10">

                            <input type="hidden" name="tablename" value="{$tableName{$m}}"/>

                            <input type="hidden" name="newdatabaseName" value="{$newdatabaseName}"/>
                            <input type="hidden" name="newUserName" value="{$newUserName}"/>
                            <input type="hidden" name="newPassword" value="{$newPassword}"/>

                            <input type="hidden" name="olddatabaseName" value="{$olddatabaseName}"/>
                            <input type="hidden" name="oldUserName" value="{$oldUserName}"/>
                            <input type="hidden" name="oldPassword" value="{$oldPassword}"/>





                            <span id="remove{$m}" class="alert alert-success"    {if  ({$tableDataCount{$m}} eq {$oldDatacount{$m}})} style="display:block" {else} style="display:none" {/if} >

                                  تم النقل --- عدد صفوف الجدول القديم : {$oldDatacount{$m}} ---- عدد صفوف الجدول الجديد : {$tableDataCount{$m}}



                                  <input type="button" onclick="emptyTable('{$tableName{$m}}', '{$newdatabaseName}', '{$newUserName}', '{$newPassword}', '{$m}');" value="مسح البيانات" class="btn btn-danger pull-left" />

                            </span>


                            <span id="removeerror{$m}" class="alert alert-danger"    {if  {$tableDataCount{$m}} >  0 && ({$tableDataCount{$m}} <> {$oldDatacount{$m}})} style="display:block" {else} style="display:none" {/if} >

                                حدث خطأ فى النقل --- عدد صفوف الجدول القديم : {$oldDatacount{$m}} ---- عدد صفوف الجدول الجديد : {$tableDataCount{$m}}



                                <input type="button" onclick="emptyTable('{$tableName{$m}}', '{$newdatabaseName}', '{$newUserName}', '{$newPassword}', '{$m}');" value="مسح البيانات" class="btn btn-danger pull-left" />

                            </span>





                            <button  type="submit" id="submit{$m}"  {if {$tableDataCount{$m}} <=  0 && ({$tableDataCount{$m}} <> {$oldDatacount{$m}})} style="display:block" {else} style="display:none" {/if}  class="btn btn-primary pull-left">نقل</button>



                        </div>
                    </div>

                </form>


                {/for}


                <form class="form-horizontal" action="transferdatabaseController.php?do=changedb" method="post" >

                    <input type="hidden" name="databaseName" value="{$newdatabaseName}"/>
                    <div class="row">

                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-4">
                                <button name="btnAdd" type="submit"  class="btn btn-success pull-left">انهاء</button>
                            </div>
                        </div>

                    </div><!-- end of fifth row-->
                </form>

            </div>
        </div>





    </div><!-- end of container-->
</div><!-- end of main row-->



