我想在猫鼬中重新实现以下对象:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
session_start();
include 'init.php';
$user = $_SESSION['user'];
$stid = oci_parse($conn, "select * from users where username = '$user' and user_type != 'manager' and floor = 4");
oci_execute($stid);
if (($user = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) == false){
echo "One return";
}else{
echo "another return";
}
?>
<html>
<head>
<title> Main Page</title>
</head>
<body>
</body>
</html>
此外,我希望Speaker1_1和Speaker2_1等是动态的,例如在“添加更多字段”表格的帮助下添加的。
我当前的猫鼬计划如下:
const lines = {
speaker1_1: {
text: `как дела?`,
audio: 'audio/аудио1.mp3',
prompt: '',
speaker: 1
},
speaker2_1: {
text: 'у меня все хорошо, а как ты?',
audio: 'audio/аудио2.mp3',
prompt: 'Say that: I am OK, how about you?',
speaker: 2,
helpers: [
{
word_mother: "I'm all right",
word_target: 'У меня все хорошо'
},
{
word_mother: 'And you?',
word_target: 'А как ты?'
}
]
},
}
};
要实现此结果,我应该在代码中进行哪些更改?