']); echo ' '; echo '

 '.$l[''].' </center><hr>'; error_handle($error); // Call a HOOK to check if it is allowed to perform this function apply_filters('can_perform_action_theme', 'manage_sets'); echo' <input id="plugins_count" type="hidden" value="'.$plugins_count.'"> <input id="themes_count" type="hidden" value="'.$themes_count.'"> <div id="selected_set" style="display:none;">'.$selected_set.'</div> <input name="create_sets" class="sai-button" id="create_sets" value="'.$l['create_sets'].'" type="button">   <input name="remove_sets" class="sai-button" id="remove_sets" value="'.$l['remove_sets'].'" type="button"> <a role="button" href="'.$globals['ind'].'act=wordpress" style="float:right;"><span class="btn btn-outline-primary">'.$l['return_to_wpm'].'</span></a> <br/><br/> <form accept-charset="'.$globals['charset'].'" name="manage_plugin_theme" method="post" action=""> <div class="row mb-4" id="add_sets_div" style="display:none;"> <div class="col-12"> <input type="text" name="set_input" class="form-control w-50 d-inline-block mb-2 mb-md-0" id="set_input" size="30" placeholder="'.$l['name_of_set'].'"/> <input name="add_sets" class="sai-button d-inline-block" id="add_sets" value="'.$l['create_set_button'].'" type="submit"> </div> </div> '.csrf_display().' </form> <div id="plugin_removed_success" class="alert alert-success" style="display:none;"><center></center></div> <div id="plugin_removed_failure" class="alert alert-danger" style="display:none;"><center></center></div> <table width="80%" id="manage_plugin_theme" class="table table-hover text-center" style="margin:0px auto;"> <thead class="sai_head2"> <tr> <th><input type="checkbox" id="check_allsets"></th> <th>'.$l['set_name'].'</th> <th></th> <th>'.$l['set_plugins'].'</th> <th></th> <th>'.$l['set_themes'].'</th> <th></th> <th></th> <th></th> <th style="cursor:pointer"> <span class="someclass" title="'.$l['default_exp'].'" style="cursor:pointer;"> <font class="bboxtxt">'.$l['default_value'].'</font> </span> </th> </tr> </thead>'; //r_print($sets); foreach($sets as $sk => $sv){ //echo '<li><a href="#">'.$av['name'].'</a></li>'; echo ' <tr> <td style="vertical-align:middle;"><input id="'.$sk.'" type="checkbox" name="sets[]" class="check_allsets"></td> <td class="class_valign">'.$sk.'</td> <td class="class_valign"><span id="'.$sk.'_plugin_count">'.(!empty($sv['plugins']) ? count($sv['plugins']) : '0').$l['total_plugin_theme'].'</span></td> <td id="'.$sk.'"><input name="'.$sk.'" class="sai-button p-2" id=""'.$sk.'"" value="'.$l['add_plugins'].'" type="button" style="padding: 2px 6px;" data-toggle="modal" data-target="#search_modal" onclick="add_plugins_themes(this.name, this.value)"></td> <td class="class_valign"><span id="'.$sk.'_theme_count">'.(!empty($sv['themes']) ? count($sv['themes']) : '0').$l['total_plugin_theme'].'</span></td> <td id="'.$sk.'"><input name="'.$sk.'" class="sai-button p-2" id="add_themes" value="'.$l['add_themes'].'" type="button" style="padding: 2px 6px;" data-toggle="modal" data-target="#search_modal" onclick="add_plugins_themes(this.name, this.value)"></td> <td class="class_valign"><span class="someclass" title="'.$l['view_items'].'" style="cursor:pointer;" data-toggle="modal" data-target="#list_set_items_modal" onclick="list_set_items(\''.$sk.'\')"><i class="fas fa-2x fa-list" style="color:#676a6c;margin:3px;"></i></span></td> <td id="'.$sk.'"> <div class="dropdown"> <button class="sai-button p-2 dropdown-toggle" type="button" data-toggle="dropdown" style="padding: 2px 6px;">'.$l['action'].' <span class="caret"></span></button> <span id="rem_plth_'.$sk.'"></span> <ul class="dropdown-menu p-2"> <li id="'.implode(",", (array) $sets[$sk]['plugins']).'" class="p-1" data-toggle="modal" data-target="#remove_plugin_theme_modal" onclick="remove_wp_plugins_themes(\''.$sk.'\', \'plugins\')"><a style="text-decoration:none; cursor:pointer;">'.$l['remove_plugins'].'</a></li> <li id="'.implode(",", (array) $sets[$sk]['themes']).'" class="p-1" data-toggle="modal" data-target="#remove_plugin_theme_modal" onclick="remove_wp_plugins_themes(\''.$sk.'\', \'themes\')"><a style="text-decoration:none; cursor:pointer;">'.$l['remove_themes'].'</a></li> </ul> </div> </td> <td><input class="sai-button p-2" id="softinstall_set_button" value="'.$l['install_set'].'" type="button" style="padding: 2px 6px;" data-toggle="modal" data-target="#softinstall_set_modal" onclick="show_softinstall_set_modal(\''.$sk.'\')"></td> <td style="vertical-align:middle;">'. (!empty($sv['themes']) || !empty($sv['plugins']) ? '<input id="default_value_'.$sk.'" type="checkbox" name="default_value" class="default_value" '.POSTchecked("default_value", $sets[$sk]['default_value']).'>' : "") .'</td> </tr>'; } echo '</table>'; // Is there any admin set ? if(!empty($admin_sets)){ echo '<br /><br /> <span class="sai_main_head"> <center class="sai_main_head" style="width:100%;" align="center">'.$l['admin_sets'].' </center><hr></span> <table width="80%" id="manage_plugin_theme" class="table table-hover text-center" style="margin:0px auto;"> <thead class="sai_head2"> <tr> <th>'.$l['set_name'].'</th> <th>'.$l['set_plugins'].'</th> <th>'.$l['set_themes'].'</th> <th>'.$l['list_items'].'</th> <th>'.$l['install_set'].'</th> </tr> </thead>'; foreach($admin_sets as $sk => $sv){ load_wp_sets_count($sv, $plugins_count, $themes_count); if(!empty($sv['enduser_set'])){ continue; } echo '<tr> <td class="class_valign">'.preg_replace('/_admin$/', '', $sk).'</td> <td class="class_valign"><span id="'.$sk.'_plugin_count">'.$plugins_count.$l['total_plugin_theme'].'</span></td> <td class="class_valign"><span id="'.$sk.'_theme_count">'.$themes_count.$l['total_plugin_theme'].'</span></td> <td class="class_valign"><span class="someclass" title="'.$l['view_items'].'" style="cursor:pointer;" data-toggle="modal" data-target="#list_set_items_modal" onclick="list_set_items(\''.$sk.'\')"><i class="fas fa-2x fa-list" style="color:#676a6c;margin:3px;"></i></span></td> <td><input class="sai-button p-2" id="softinstall_set_button" value="'.$l['install_set'].'" type="button" style="padding: 2px 6px;" data-toggle="modal" data-target="#softinstall_set_modal" onclick="show_softinstall_set_modal(\''.$sk.'\')"></td> </tr>'; } } echo '</table> <!-- remove plugins Modal --> <div class="modal fade" id="remove_plugin_theme_modal" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title"></h5> <button type="button" class="close d-inline-block" data-dismiss="modal">×</button> </div> <div class="modal-body"> <input type="hidden" name="plugin_or_theme" id="plugin_or_theme" value=""> <input type="hidden" name="plugin_theme_set" id="plugin_theme_set" value=""> <table id="remove_plugins_themes" class="table table-hover"> </table> </div> <div class="modal-footer"> '.csrf_display().' <button type="button" class="btn btn-default sai-button" data-dismiss="modal" id="remove_plugin_submit" onclick="remove_plugin_submit()">'.$l['remove'].'</button> </div> </div> </div> </div> <!-- List Set Items Modal --> <div class="modal fade" id="list_set_items_modal" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title"></h5> <button type="button" class="close d-inline-block" data-dismiss="modal">×</button> </div> <div class="modal-body" id="list_plugins_themes"> </div> <div class="modal-footer"> <button type="button" class="btn btn-default sai-button" data-dismiss="modal">'.$l['ok'].'</button> </div> </div> </div> </div> <!--search plugins Modal --> <div class="modal fade" id="search_modal" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title"></h5> <button type="button" class="close d-inline-block" data-dismiss="modal">×</button> </div> <div class="modal-body"> <div id="add_success" class="alert alert-success" style="display:none;"></div> <div id="add_failed" class="alert alert-danger" style="display:none;"></div> <input type="text" name="search_input_wp" class="form-control" id="search_input_wp" size="30" placeholder="'.$l['search_wp_sets'].'"/><br /> <input type="hidden" name="set_post" id="set_post" value=""><br /> <input type="hidden" name="plugin_or_theme" id="plugin_or_theme" value=""><br /> <div id="plugin_theme_results"></div> </div> <div class="modal-footer"> <div id="add_plth" class="wpc_inline"></div> '.csrf_display().' <button type="button" class="btn btn-default sai-button" id="submit_plugins_themes" name="submit_plugins_themes" onclick="submit_addition();">Add</button> </div> </div> </div> </div> <!--Install Set Modal for Softaculous--> <div class="modal fade" id="softinstall_set_modal" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title"></h5> <button type="button" class="close d-inline-block" data-dismiss="modal">×</button> </div> <div class="modal-body"> <div id="install_success" class="alert alert-success" style="display:none;">'.$l['install_set_success'].'</div> <div id="install_failed" class="alert alert-danger" style="display:none;">'.$l['install_set_fail'].'</div> <div id="no_plugins_themes" class="alert alert-warning" style="display:none;"></div> <input type="hidden" name="softinstall_set_name" id="softinstall_set_name" value=""> <div id="installations_list" style="display:none;"> <div class="sai_sub_head">Select the Websites you want to install the Set on: </div><br /> <table border="0" cellpadding="5" cellspacing="0" width="90%" class="table table-hover">'; foreach($user['ins'] as $insid => $soft){ if(is_wordpress($soft['sid'])){ // Only Wordpress Installs echo ' <tr> <td><input type="checkbox" class="check_websites" name="webids[]" id="'.$insid.'" value="'.$insid.'"></td> <td> <span title="'.$l['set_installed'].'" id="has_set_'.$insid.'" class="has_set" name="'.( !empty($soft['sets']) ? ":".implode(":",$soft['sets']).":": ":" ).'"> <i class="fas fa-check fa-1x" style="color: #008040;"></i> </span> </td> <td><label class="sai_head label" for="'.$insid.'">'.$soft["softurl"].'</label></td> </tr>'; } } echo ' </table> </div> </div> <div class="modal-footer"> <div id="install_div"></div> '.csrf_display().' <button type="button" class="btn btn-default sai-button" id="softsubmit_install_set" name="softsubmit_install_set" onclick="softsubmit_install_set();">Install</button> </div> </div> </div> </div> </div>'; softfooter(); } ?>