Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addhost.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ classname: 'ddsmoothmenu', //class added to menu's outer DIV
<th scope="col" class="rounded-company">Name</th>
<th scope="col" class="rounded-q1">IP / Hostname</th>
<th scope="col" class="rounded-q1">Port</th>
<th scope="col" class="rounded-q1"><? if($config->cointype=='scrypt'){echo "KH/s";}else{ echo "MH/s";}?> desired</th>
<th scope="col" class="rounded-q1"><?php if($config->cointype=='scrypt'){echo "KH/s";}else{ echo "MH/s";}?> desired</th>
</tr>
<tr>
<td align=center><input type="text" name="macname" value=""></td>
Expand All @@ -137,7 +137,7 @@ classname: 'ddsmoothmenu', //class added to menu's outer DIV
<b>Name:</b> You can enter any name you like.<BR>
<b>IP/Hostname:</b> Enter the IP or Hostname of your cgminer cgapi enabled host. I.E. 10.10.1.10 or 192.168.1.10. You can also use FQDN so miner1.mynet.com i.e.<BR>
<b>Port:</b> The port CGMINER is listening on (default 4028)<BR>
<b><? if($config->cointype=='scrypt'){echo "KH/s";}else{ echo "MH/s";}?> desired:</b> If you already now how much <? if($config->cointype=='scrypt'){echo "KH/s";}else{ echo "MH/s";}?> your host will/should make, enter it here.<BR>
<b><?php if($config->cointype=='scrypt'){echo "KH/s";}else{ echo "MH/s";}?> desired:</b> If you already now how much <?php if($config->cointype=='scrypt'){echo "KH/s";}else{ echo "MH/s";}?> your host will/should make, enter it here.<BR>
<BR>
You can change any value afterwards.<BR>
</p>
Expand Down
21 changes: 19 additions & 2 deletions edithost.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,22 @@
$dev_response = send_request_to_host($arr, $host_data);
sleep(2);
}

if (isset($_POST['startasc']))
{
$asc_id = filter_input(INPUT_POST, 'startasc', FILTER_SANITIZE_NUMBER_INT);
$arr = array ('command'=>'ascenable','parameter'=>$asc_id);
$dev_response = send_request_to_host($arr, $host_data);
sleep(2);
}

if (isset($_POST['stopasc']))
{
$asc_id = filter_input(INPUT_POST, 'stopasc', FILTER_SANITIZE_NUMBER_INT);
$arr = array ('command'=>'ascdisable','parameter'=>$asc_id);
$dev_response = send_request_to_host($arr, $host_data);
sleep(2);
}

if (isset($_POST['flashpga']))
{
Expand Down Expand Up @@ -322,7 +338,7 @@ classname: 'ddsmoothmenu', //class added to menu's outer DIV
<th scope="col" class="rounded-company">Name</th>
<th scope="col" class="rounded-q1">IP / Hostname</th>
<th scope="col" class="rounded-q1">Port</th>
<th scope="col" class="rounded-q1"><? if($config->cointype=='scrypt'){echo "KH/s";}else{ echo "MH/s";}?> desired</th>
<th scope="col" class="rounded-q1"><?php if($config->cointype=='scrypt'){echo "KH/s";}else{ echo "MH/s";}?> desired</th>
</tr>
<tr>
<td align=center><input type="text" name="macname" value="<?php echo $host_data['name']; ?>"></td>
Expand Down Expand Up @@ -363,6 +379,7 @@ classname: 'ddsmoothmenu', //class added to menu's outer DIV
<div class="cleaner"></div>
</div>
</div>



</body>
</html>
17 changes: 16 additions & 1 deletion func.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,17 @@ function process_dev_disp($gpu_data_array, $edit=false)

$DEV_cell = $gpu_data_array['Name'] . $gpu_data_array['PGA'];
}
else if (isset($gpu_data_array['ASC']))
{
if ($privileged)
{
if(($gpu_data_array['Enabled'] == "Y"))
$button = "<button type='submit' name='stopasc' value='".$gpu_data_array['ASC'].$button_disable."'>Stop</button>";
else
$button = "<button type='submit' name='startasc' value='".$gpu_data_array['ASC'].$button_disable."'>Start</button>";
}
$DEV_cell = $gpu_data_array['Name'] . $gpu_data_array['ASC'];
}
else if (isset($gpu_data_array['CPU']))
{
$DEV_cell = $gpu_data_array['Name'] . $gpu_data_array['CPU'];
Expand Down Expand Up @@ -871,7 +882,7 @@ function process_devs_disp($host_data, $edit=false)
/* Description: retrives a single dev from a host
/* Inputs: host_data - the host data array.
/* devid - the the device ID.
/* type - the the device type (CPU/GPU/PGA).
/* type - the the device type (CPU/GPU/PGA/ASC).
/* Outputs: return - the device data array
*****************************************************************************/
function get_dev_data($host_data, $devid, $type)
Expand All @@ -888,6 +899,10 @@ function get_dev_data($host_data, $devid, $type)
{
$cmnd = 'pga';
}
else if ($type == 'ASC')
{
$cmnd = 'asc';
}

$arr = array ('command'=>$cmnd,'parameter'=>$devid);
$dev_arr = send_request_to_host($arr, $host_data);
Expand Down