本文整理汇总了PHP中featurecode::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP featurecode::delete方法的具体用法?PHP featurecode::delete怎么用?PHP featurecode::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类featurecode
的用法示例。
在下文中一共展示了featurecode::delete方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: miscapps_delete
function miscapps_delete($miscapps_id)
{
global $db;
$sql = "DELETE FROM miscapps WHERE miscapps_id = " . $db->escapeSimple($miscapps_id);
$result = $db->query($sql);
if (DB::IsError($result)) {
die_freepbx($result->getMessage() . $sql);
}
$fc = new featurecode('miscapps', 'miscapp_' . $miscapps_id);
$fc->delete();
}
示例2: featurecode
<?php
// Delete the old code if still there
//
$fcc = new featurecode('daynight', 'toggle-mode');
$fcc->delete();
unset($fcc);
$list = daynight_list();
foreach ($list as $item) {
$id = $item['ext'];
$fcc = new featurecode('daynight', 'toggle-mode-' . $id);
$fcc->delete();
unset($fcc);
}
sql('DROP TABLE IF EXISTS daynight');
示例3: recordings_del
function recordings_del($id)
{
$results = sql("DELETE FROM recordings WHERE id = \"{$id}\"");
// delete the feature code if it existed
$fcc = new featurecode('recordings', 'edit-recording-' . $id);
$fcc->delete();
unset($fcc);
}
示例4: updateRecording
/**
* Update Recording by ID
* @param integer $id The recording ID
* @param string $name The recording short name
* @param string $description The recording long name
* @param string $files & separated list of files to playback
* @param integer $fcode Feature Code number_format
* @param string $fcode_pass Feature code password
*/
public function updateRecording($id, $name, $description, $files, $fcode = 0, $fcode_pass = '')
{
$sql = "UPDATE recordings SET displayname = ?, description = ?, filename = ?, fcode = ?, fcode_pass = ? WHERE id = ?";
$sth = $this->db->prepare($sql);
$sth->execute(array($name, $description, $files, $fcode, $fcode_pass, $id));
if ($fcode != 1) {
// delete the feature code if it existed
//
$fcc = new \featurecode('recordings', 'edit-recording-' . $id);
$fcc->delete();
unset($fcc);
} else {
// Add the feature code if it is needed
//
$fcc = new \featurecode('recordings', 'edit-recording-' . $id);
$fcc->setDescription("Edit Recording: {$name}");
$fcc->setDefault('*29' . $id);
$fcc->setProvideDest();
$fcc->update();
unset($fcc);
}
needreload();
}
示例5: delete
public function delete($miscapps_id)
{
$db = $this->db;
$sql = "DELETE FROM miscapps WHERE miscapps_id = ?";
$q = $db->prepare($sql);
$q->execute(array($miscapps_id));
if ($q) {
debug('******* q was true **********');
$fc = new \featurecode('miscapps', 'miscapp_' . $miscapps_id);
$fc->delete();
return true;
}
return false;
}
示例6: delTimeCondition
public function delTimeCondition($id)
{
$sql = "DELETE FROM timeconditions WHERE timeconditions_id = :id";
$stmt = $this->db->prepare($sql);
$fcc = new \featurecode('timeconditions', 'toggle-mode-' . $id);
$fcc->delete();
unset($fcc);
if ($this->astman != null) {
$this->astman->database_del("TC", $id);
}
\FreePBX::Hooks()->processHooks($id);
return $stmt->execute(array(':id' => $id));
}
示例7: daynight_del
function daynight_del($id)
{
// TODO: delete ASTDB entry when deleting the mode
//
$results = sql("DELETE FROM daynight WHERE ext = {$id}", "query");
$fcc = new featurecode('daynight', 'toggle-mode-' . $id);
$fcc->delete();
unset($fcc);
$dn = new dayNightObject($id);
$dn->del();
unset($dn);
}