HEX
Server: LiteSpeed
System: Linux w5304130.sdnsbox.com 4.18.0-425.3.1.lve.el8.x86_64 #1 SMP Tue Nov 22 22:59:23 EST 2022 x86_64
User: makefitmeserver (1001)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //var/softaculous/apps/git/themes/admin/git_repositories_theme.php
<?php

//////////////////////////////////////////////////////////////
//===========================================================
// WEBUZO CONTROL PANEL
// Inspired by the DESIRE to be the BEST OF ALL
// ----------------------------------------------------------
// Started by: Mamta Malvi
// Date:	   07 th April 2022
// Time:	   21:00 hrs
// Site:	   https://webuzo.com/ (WEBUZO)
// version_control.php
// ----------------------------------------------------------
// Please Read the Terms of Use at https://webuzo.com/terms
// ----------------------------------------------------------
//===========================================================
// (c) Softaculous Ltd.
//===========================================================
//////////////////////////////////////////////////////////////

if(!defined('SOFTACULOUS')){
	die('Hacking Attempt');
}

function git_repositories_theme(){

global $theme, $globals, $user, $WE, $softpanel, $repo_list;

	echo '
    <div class="soft-smbox p-3">
        <div class="sai_main_head text-center">
            <img src="'.$theme['images'].'git_icon.png" alt="" class="webu_head_img me-2" style="height: 30px"/><h5 class="d-inline-block">'.__('Git Repositories').'</h5>
        </div>
        <hr>';
    
        page_links();

        echo '
        <div id="showrectab" class="table-responsive">
            <table class="table align-middle table-nowrap mb-0 webuzo-table">
            <thead class="sai_head2">	
                <tr>
                <th>Repository Name</th>
                <th>Repository Path</th>
                <th>User</th>
                <th class="text-center" colspan="3">Action</th>
                </tr>
            </thead>
            <tbody id="repo_list">';
            if(empty($repo_list)){
                echo '<tr><td colspan="4" align="center">'.__('No Repository Found!').'</td></tr>';
            }else{
                foreach($repo_list as $index => $row){
                    echo '
                    <tr>
                        <td>'.$row['repo_name'].'</td>
                        <td>'.$row['repo_path'].'</td>
                        <td>'.$row['user'].'</td>
                        <td class="text-center" width="12%">
                            <a class="btn flat-butt w-100 btn-git" onclick="delete_repo(this)" id="did'.$row['id'].'" data-delete="'.$row['repo_path'].'" data-user="'.$row['user'].'" title="'.__('Delete').'"><i class="fas fa-trash delete-icon mb-2" ></i></a>
                        </td>
                    </tr>';
                }
            }
            echo '
            </tbody>
            </table>
        </div>
    </div>

    <script>
        function delete_repo(jEle){

            a = show_message_r(l.warning, "'.__('This action only removes the repository from the list of repositories. The system will not delete the files. To completely delete the repository, manually delete the files after you remove it from the list.').'");
            a.alert = "alert-warning";
            
            a.confirm.push(function(){
                var d = $(jEle).data();
                
                submitit(d, {
                    done_reload : window.location
                });		
            });

            show_message(a);
        }
    </script>';
    
}