Jump to content

AzeS

Members
  • Posts

    88
  • Joined

  • Last visited

Community Answers

  1. AzeS's post in Session offset gets lost during header change. was marked as the answer   
    http://stackoverflow.com/questions/17242346/php-session-lost-after-redirect 
  2. AzeS's post in Open modal after php wont work was marked as the answer   
    Solved by my self, im sorry, i need to have more patience with my brain....
     
    php
    if (isset($_POST['btn_exe_det_prf'])) { $id = strip_tags($_POST['btn_exe_det_prf']); $id = trim($id); $reviews = $profile->coment_get($id); echo $id; echo "<script> $(window).Onload(Despair()); </script>"; } Html
    <div id='myModal'>Some content</div> js
    <script> // Get the modal var modal = document.getElementById('myModal'); // Get the button that opens the modal var btn = document.getElementById("myBtn"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks the button, open the modal function Despair() { modal.style.display = "block"; } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } </script> solution:
     
    php
     
    if (isset($_POST['btn_exe_det_prf'])) { $id = strip_tags($_POST['btn_exe_det_prf']); $id = trim($id); $reviews = $Shop->coment_get($id); echo $id; echo "<script> var trigger = 1; </script>"; } html
     
    <div id='myModal'>Some content<span>close</span></div> js
    <script> // Get the modal var modal = document.getElementById('myModal'); // Get the button that opens the modal var btn = document.getElementById("myBtn"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks the button, open the modal function Despair() { modal.style.display = "block"; } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } </script> solution 
    at the end of the script:
     
    <script> if (trigger == 1) { $(window).Onload(Despair()); trigger = 0; } </script>
  3. AzeS's post in What am i doing wrong agian ? was marked as the answer   
    $res = $sql->fetch(PDO::FETCH_ASSOC);
  4. AzeS's post in Video upload won't work was marked as the answer   
    --> changed dir var to
    ../../VID/ it works now needed to change the ini a little more...
     
    post_max_size upload_max_filesize memory_limit to 1000M 
     
     
    thanks alot ! 
  5. AzeS's post in failing to declare a varible from an lower positon was marked as the answer   
    !!! SOLVED !!!

    What was i doing wrong ? 
    as i early mentioned i tried to "move a variable upwards" this seems to be impossible for php at least nobody had a suggestion so 
    my scraped up mind did came up with an great idea!!   
     
    wy not move them downwards and lift them with the post method... i know it seems obvios but as leazy and sadistic i am i tried to ask the community for help ... but enough of my stupiditie and see what i did wrong...
    corrected code below:

    EVENT: 
    if (isset($_POST['smsg'])) { $OBJECT = strip_tags($_POST['smsginp']); $OBJECT = trim($OBJECT); $OBJECT = str_split($OBJECT, 255); $SENDER = strip_tags($_POST['SESSID']); $SENDER = trim($SENDER); $RECIVER = strip_tags($_POST['RECIVER']); $RECIVER = trim($RECIVER); $SESSID = strip_tags($_POST['SESSID']); $SESSID = trim($SESSID); echo $SESSID; if (isset($OBJECT[1])) { $res = $crud->sendmsg($SENDER,$RECIVER,$OBJECT[0],$OBJECT[1],$SESSID,0); } else { $res = $crud->sendmsg($SENDER,$RECIVER,$OBJECT[0],null,$SESSID,0); } if ($res != 0 ) { $msg = "Your message has been sended succesfully."; } else { $msg = "there was been an error sending your message you might report a bug."; } } if (isset($_POST['sdestroy'])) { $res = $crud->sendmsg($SENDER,$RECIVER,"closing the session",null,$SESSID,0); if ($res != 0 ) { $msg = "session has been closed we hope we could help you with your problem"; } else { $msg = "there was been an error closing the session you might report a bug."; } } method: 
    <div class="HeZ Body_E01" id="chatcz"> <ul> <?php $cond = $crud->check($ID); if ($cond > 0) { $ROWS_SESS = $crud->THOUTSESS($ID); $SESSID = $ROWS_SESS['SESSID']; $SENDER = $ID; $RECIVER = $ROWS_SESS['FROM_']; echo "THIS SESSID CURRENT__:" . $SESSID . "<br>"; echo "THIS SENDER CURRENT__:" . $SENDER . "<br>"; echo "THIS RECIVER CURRENT_:" . $RECIVER . "<br>"; $CBA = 1; $smsgtoutall = $crud->getmsg($SESSID); if ($smsgtoutall == 0 ) { echo "<li><p>there are currently no items to display yet..." . "</p></li>"; } else { foreach($smsgtoutall as $row) { if ($row['FROM_'] == $ID) { $SENDERN = "You"; } else { $SENDERN = "Employe"; } echo "<li><p>" . $crud->word($SENDERN, 'UTF-8') . ": " . $crud->word($row['SUBJECT'], 'UTF-8') . $crud->word($row['SUBJECT_2'], 'UTF-8') . "</p><p> " . $crud->word($row['TIMEST'], 'UTF-8') . "</p></li>"; } } } else { echo $crud->check($ID); echo "<br>this: " . $cond; } ?> </ul> </div> <div class="CZ3"> <form method="POST" class="CZT"> <center>You have <input disabled maxlength="3" size="1" value="510" id="counter2"> Characters left</center> <div id="chatcz"> <input type="text" name="SESSID" value="<?php echo $crud->word($SESSID, 'UTF-8') ?>"> <input type="text" name="SENDER" value="<?php echo $crud->word($SENDER, 'UTF-8')?>"> <input type="text" name="RECIVER" value="<?php echo $crud->word($RECIVER, 'UTF-8')?>"> </div> <textarea placeholder="Message..." maxlength="510" name="smsginp" cols="55" rows="5" onkeyup="textCounter(this,'counter2',510);" id="message" > </textarea> <button name="smsg">Send</button> <button name="sdestroy">End Session</button> <p>Or</p> <button name="report">Report abuse</button> </form> </div>
    Sincerly, AzeS.

    P.S.

    #WORKING PHP CHAT APP
  6. AzeS's post in And another question xD (php callout doesnt work properly) was marked as the answer   
    Thanks alot !!!   
     
    public function thouhistory($UID,$IND) { #Abruf history für user if ($IND == null) { try { $sql = $this->Db->prepare("SELECT * FROM history WHERE uid=:id"); $sql->execute(array(':id' => $UID)); $res = $sql->fetchAll(); if (count($res)) { return $res; } else { return 0; } return $row; } catch (PDOException $ex) { echo $ex->getMessage(); } } else { try { $sql = $this->Db->prepare("SELECT * FROM history WHERE uid=:id AND DATE_IND=:IND"); $sql->execute(array(':IND' => $IND,':id' => $UID)); $res = $sql->fetchAll(); if (count($res)) { return $res; } else { return 0; } return $row; } catch (PDOException $ex) { echo $ex->getMessage(); } # history $CREDIT['CREDIT'] !!!!!!!!!!!!!!!!!!!!!!!!!!!!! } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.