function encoder_redirect_success(Famous_Phone $famous_phone) { $Phone = $famous_phone->getPhone(); $dir = "VIEW/html/Encoder/Add_Phone/Add_Phone_Number.php?success=1&Phone={$Phone}"; $url = BASE_URL . $dir; header("Location:{$url}"); //redirect the encoder to the regions add place exit; }
function encoder_redirect_success(Famous_Phone $new_Phone) { $new_Phone_name = $new_Phone->getPhone(); $dir = "VIEW/html/Encoder/Add_Phone/Phone_List.php?success_edit=1"; $url = BASE_URL . $dir; header("Location:{$url}"); //redirect the encoder to the Phones add place exit; }
function Famous_Phone_Exists(Famous_Phone $famous_phone) { $Phone = $famous_phone->getPhone(); $query = "SELECT * FROM Famous_Phones WHERE Phone = '{$Phone}'"; $result = mysqli_query($this->getDbc(), $query); if (mysqli_num_rows($result) >= 1) { return TRUE; } else { return FALSE; } }
function Edit_Phone(Famous_Phone $Phone, $Phone_ID) { $Phone_Number = $Phone->getPhone(); $Phone_Description = $Phone->getDescription(); $Phone_Description_Amharic = $Phone->getDescriptionAmharic(); $query = "update famous_phones\n\t\t\t\t\tset phone='{$Phone_Number}',Description='{$Phone_Description}',\n\t\t\t\t\tDescription_Amharic='{$Phone_Description_Amharic}'\n\t\t\t\t\twhere ID='{$Phone_ID}'"; $result = mysqli_query($this->getDbc(), $query); if ($result) { return TRUE; } else { return FALSE; } }