can you make resseler restart stream
Captured with Lightshot
prnt.sc
in api.php admin folder stop this //
// if ((!$rPermissions["is_admin"]) OR (!hasPermissions("adv", "edit_stream"))) { echo json_encode(Array("result" => False)); exit; }
group.php
add line
<!-- Added a permisson toggle here for "reseller_controls_streams" -->
<div class="form-group row mb-4">
<label class="col-md-4 col-form-label" for="reseller_controls_streams">Can Control Streams</label>
<div class="col-md-2">
<input name="reseller_controls_streams" id="reseller_controls_streams" type="checkbox" <?php if (isset($rGroup)) { if ($rGroup["reseller_controls_streams"]) { echo "checked "; } } ?>data-plugin="switchery" class="js-switch" data-color="#039cfd"/>
table_search.php
// next 9 lines adds restart button for live and down streams to allowed reseller
if (($rPermissions["is_reseller"]) && ($rPermissions["reseller_controls_streams"])) {
if ((intval($rActualStatus) == 1) OR (intval($rActualStatus) == 2) OR (intval($rActualStatus) == 3) OR ($rRow["on_demand"] == 1) OR ($rActualStatus == 5)) {
$rStatus = '';
} else {
$rStatus = ' disabled';
}
$rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Restart" type="button" class="btn btn-light waves-effect waves-light btn-xs api-restart" onClick="api('.$rRow["id"].', '.$rRow["server_id"].', \'restart\');"'.$rStatus.'><i class="mdi mdi-refresh"></i></button>
';
}
// previous 9 lines adds restart button for live and down streams to allowed reseller
and streams.php
},
responsive: false,
processing: true,
serverSide: true,
ajax: {
url: "./table_search.php",
"data": function(d) {
d.id = "streams",
d.category = getCategory();
<?php if ($rPermissions["is_admin"]) { ?>
d.filter = getFilter();
// next 2 lines lists all streams to allowed reseller groups. panel doesn't have live + down filter. i didn't want to mess with it.
<?php } else if (($rPermissions["is_reseller"]) && ($rPermissions["reseller_controls_streams"])) { ?>
<?php } else { ?>
d.filter = 1;
<?php } ?>
d.server = getServer();
}
},