Please Help

fahad

Member
Feb 13, 2016
12
5
38
I am Making a Control Panel for public anyone will download it I need a help, this script is not working can anyone fix and and send it to me please and i dont know the misstake of this need help :D

PHP:
<?php

include 'include/get.php';

    try {
 
        $connect = "serverquery://".$config["USER_QUERY"].":".$config["PASS_QUERY"]."@".$config["HOST_QUERY"].":".$config["PORT_QUERY"]."/?server_port=".$config["SERVER_PORT"]."";
        $ts3_VirtualServer = TeamSpeak3::factory($connect);
        $ts3_VirtualServer->selfUpdate(array('client_nickname'=>$config["NICK_QUERY"]));
        $verified = 0;
        foreach ($ts3_VirtualServer->clientList() as $cl) {
        if ($cl->getProperty('connection_client_ip') == $_SERVER['REMOTE_ADDR']) {
        $client_verified = $cl;
        $_SESSION ['ggids'] = explode(",", $client_verified["client_servergroups"]);
        if(in_array(78,$_SESSION['ggids'])){
        header('Location: activated.php');
        }
        if(in_array(61,$_SESSION['ggids'])){
        $verified++;
     
        include 'include/velis.php';
     
        ?>
     
        <html>
        <div class="col-md-6">
              <!-- Widget -->
              <div class="widget">
                <div class="widget-content padding-35 bg-white clearfix">
                  <div class="counter counter-md pull-left text-left">
                    <div class="pull-left">
                    <button type="button" class="btn btn-primary ladda-button" data-target="#exampleNifty3dSign" data-toggle="modal" type="button">
                      <span class="ladda-label">Send a Message for everone <i class="icon wb-arrow-right margin-left-10" aria-hidden="true"></i></span>
                    </button>
                       
                        </div>
        <div class="modal fade modal-3d-sign" id="exampleNifty3dSign" aria-hidden="true" aria-labelledby="exampleModalTitle" role="dialog" tabindex="-1" style="display: none;">
                    <div class="modal-dialog">
                      <div class="modal-content">
                        <div class="modal-header">
                          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">×</span>
                          </button>
                          <h4 class="modal-title">Send a Message for everone</h4>
                        </div>
                        <div class="modal-body">
                        <?php
if(isset($_POST['submit'])){
 
    if(empty($_POST['textm'])){
     
     
    } else {
        $textofmessage = $_POST['textm'];
        $pokee9 = $_POST['poke'];
        if($pokee9 == 1){
         
         
            if($_POST['nor1'] == 1){
                foreach ($ts3_VirtualServer->clientList() as $css) {
                        // skip query clients
                        if ($css["client_type"]) continue;
                        // send test message if client build is outdated
                        $logoeee = "broadcast ".htmlspecialchars($cl->client_nickname)." : ".$textofmessage." ";
                        $newtextofmessage = substr($logoeee, 0, 100);
                        $css->poke($newtextofmessage);

                    } 
             
            } else {
             
                foreach ($ts3_VirtualServer->clientList() as $css) {
                        // skip query clients
                        if ($css["client_type"]) continue;
                        // send test message if client build is outdated
                        $css->poke($textofmessage);
                    }
             
            }
        }
        $message9 = $_POST['message'];
        if($message9 == 1){         
         
            if($_POST['nor1'] == 1){
                foreach ($ts3_VirtualServer->clientList() as $css) {
                        // skip query clients
                        if ($css["client_type"]) continue;
                        // send test message if client build is outdated
                        $css->message("broadcast from ".htmlspecialchars($cl->client_nickname)." : ".$textofmessage." ");

                    } 
             
            } else {
                foreach ($ts3_VirtualServer->clientList() as $css) {
                        // skip query clients
                        if ($css["client_type"]) continue;
                        // send test message if client build is outdated
                        $css->message($textofmessage);
                    }
         
            }
     
        }
    }
 
}

?>
                          <form method="post" role="form" action="">
                        <div class="modal-body">
                          <div class="row">
                            <div class="form-group form-material row">
                             <div class="col-sm-3">
                                <label class="control-label" for="inputGrid1">preview send message </label>
                                <input type="text" class="form-control" id="nor1" name="nor1" placeholder="تبي حط 1">
                             </div>
                             <div class="col-sm-3">
                                <label class="control-label" for="inputGrid2">Poke</label>
                                <input type="text" class="form-control" id="poke" name="poke" placeholder="تبي حط 1">
                             </div>
                             <div class="col-sm-3">
                                <label class="control-label" for="inputGrid2">Privtae Message</label>
                                <input type="text" class="form-control" id="message" name="message" placeholder="تبي حط 1">
                             </div>
                            </div>
                            <div class="form-group form-material row">
                             <div class="col-sm-9">
                                <label class="control-label" for="inputGrid1">Message</label>
                                <input type="text" class="form-control" id="textm" name="textm" placeholder="لازم الرسالة">
                             </div>
                            </div>
                          </div>
                          </div>
                        </div>
                        <div class="modal-footer">
                          <button type="button" class="btn btn-default margin-0" data-dismiss="modal">Cancel</button>
                          <button type="submit" name="submit" class="btn btn-primary">Send</button>
                         </form>
                        </div>
                      </div>
                    </div>
                  </div>
                      </div>
                    </div>
                  </div>
                    <span class="ladda-spinner"></span><div class="ladda-progress" style="width: 0px;"></div></button>
                  </div>
                 
                  </div>
                  <div class="pull-right white">
                    <i class="icon icon-circle icon-2x wb-users bg-blue-600" aria-hidden="true"></i>
                    </html>
 
Last edited:

Norvik

Retired Staff
Contributor
Jul 18, 2015
635
588
157
Make sure to use code tags next time. Maybe you should explain what your problem is instead of posting random shitty code without any kind of explanation.
 

Some_body

New Member
Mar 27, 2017
30
4
20
I am Making a Control Panel for public anyone will download it I need a help, this script is not working can anyone fix and and send it to me please and i dont know the misstake of this need help :D

PHP:
<?php

include 'include/get.php';

    try {
 
        $connect = "serverquery://".$config["USER_QUERY"].":".$config["PASS_QUERY"]."@".$config["HOST_QUERY"].":".$config["PORT_QUERY"]."/?server_port=".$config["SERVER_PORT"]."";
        $ts3_VirtualServer = TeamSpeak3::factory($connect);
        $ts3_VirtualServer->selfUpdate(array('client_nickname'=>$config["NICK_QUERY"]));
        $verified = 0;
        foreach ($ts3_VirtualServer->clientList() as $cl) {
        if ($cl->getProperty('connection_client_ip') == $_SERVER['REMOTE_ADDR']) {
        $client_verified = $cl;
        $_SESSION ['ggids'] = explode(",", $client_verified["client_servergroups"]);
        if(in_array(78,$_SESSION['ggids'])){
        header('Location: activated.php');
        }
        if(in_array(61,$_SESSION['ggids'])){
        $verified++;
    
        include 'include/velis.php';
    
        ?>
    
        <html>
        <div class="col-md-6">
              <!-- Widget -->
              <div class="widget">
                <div class="widget-content padding-35 bg-white clearfix">
                  <div class="counter counter-md pull-left text-left">
                    <div class="pull-left">
                    <button type="button" class="btn btn-primary ladda-button" data-target="#exampleNifty3dSign" data-toggle="modal" type="button">
                      <span class="ladda-label">Send a Message for everone <i class="icon wb-arrow-right margin-left-10" aria-hidden="true"></i></span>
                    </button>
                      
                        </div>
        <div class="modal fade modal-3d-sign" id="exampleNifty3dSign" aria-hidden="true" aria-labelledby="exampleModalTitle" role="dialog" tabindex="-1" style="display: none;">
                    <div class="modal-dialog">
                      <div class="modal-content">
                        <div class="modal-header">
                          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">×</span>
                          </button>
                          <h4 class="modal-title">Send a Message for everone</h4>
                        </div>
                        <div class="modal-body">
                        <?php
if(isset($_POST['submit'])){
 
    if(empty($_POST['textm'])){
    
    
    } else {
        $textofmessage = $_POST['textm'];
        $pokee9 = $_POST['poke'];
        if($pokee9 == 1){
        
        
            if($_POST['nor1'] == 1){
                foreach ($ts3_VirtualServer->clientList() as $css) {
                        // skip query clients
                        if ($css["client_type"]) continue;
                        // send test message if client build is outdated
                        $logoeee = "broadcast ".htmlspecialchars($cl->client_nickname)." : ".$textofmessage." ";
                        $newtextofmessage = substr($logoeee, 0, 100);
                        $css->poke($newtextofmessage);

                    }
            
            } else {
            
                foreach ($ts3_VirtualServer->clientList() as $css) {
                        // skip query clients
                        if ($css["client_type"]) continue;
                        // send test message if client build is outdated
                        $css->poke($textofmessage);
                    }
            
            }
        }
        $message9 = $_POST['message'];
        if($message9 == 1){        
        
            if($_POST['nor1'] == 1){
                foreach ($ts3_VirtualServer->clientList() as $css) {
                        // skip query clients
                        if ($css["client_type"]) continue;
                        // send test message if client build is outdated
                        $css->message("broadcast from ".htmlspecialchars($cl->client_nickname)." : ".$textofmessage." ");

                    }
            
            } else {
                foreach ($ts3_VirtualServer->clientList() as $css) {
                        // skip query clients
                        if ($css["client_type"]) continue;
                        // send test message if client build is outdated
                        $css->message($textofmessage);
                    }
        
            }
    
        }
    }
 
}

?>
                          <form method="post" role="form" action="">
                        <div class="modal-body">
                          <div class="row">
                            <div class="form-group form-material row">
                             <div class="col-sm-3">
                                <label class="control-label" for="inputGrid1">preview send message </label>
                                <input type="text" class="form-control" id="nor1" name="nor1" placeholder="تبي حط 1">
                             </div>
                             <div class="col-sm-3">
                                <label class="control-label" for="inputGrid2">Poke</label>
                                <input type="text" class="form-control" id="poke" name="poke" placeholder="تبي حط 1">
                             </div>
                             <div class="col-sm-3">
                                <label class="control-label" for="inputGrid2">Privtae Message</label>
                                <input type="text" class="form-control" id="message" name="message" placeholder="تبي حط 1">
                             </div>
                            </div>
                            <div class="form-group form-material row">
                             <div class="col-sm-9">
                                <label class="control-label" for="inputGrid1">Message</label>
                                <input type="text" class="form-control" id="textm" name="textm" placeholder="لازم الرسالة">
                             </div>
                            </div>
                          </div>
                          </div>
                        </div>
                        <div class="modal-footer">
                          <button type="button" class="btn btn-default margin-0" data-dismiss="modal">Cancel</button>
                          <button type="submit" name="submit" class="btn btn-primary">Send</button>
                         </form>
                        </div>
                      </div>
                    </div>
                  </div>
                      </div>
                    </div>
                  </div>
                    <span class="ladda-spinner"></span><div class="ladda-progress" style="width: 0px;"></div></button>
                  </div>
                
                  </div>
                  <div class="pull-right white">
                    <i class="icon icon-circle icon-2x wb-users bg-blue-600" aria-hidden="true"></i>
                    </html>
I know this script but how did you get this panel ? :rolleyes:
 

Some_body

New Member
Mar 27, 2017
30
4
20
Make sure to use code tags next time. Maybe you should explain what your problem is instead of posting random shitty code without any kind of explanation.
As we can see this script is for sending massege or poke to all clients
I Got it form my Friend Why ? and can you help me ?
I didn't test the code so i don't know what is the problem but could you post the error massege to let us unless understand it and help you ?
 

fahad

Member
Feb 13, 2016
12
5
38
As we can see this script is for sending massege or poke to all clients

I didn't test the code so i don't know what is the problem but could you post the error massege to let us unless understand it and help you ?
The page is not working :eek:
 
Top