merge heihedata branch r4465

This commit is contained in:
wlx 2014-05-09 02:36:30 +00:00
parent 42c2cba7bb
commit b153bfcedf
2 changed files with 8 additions and 6 deletions

View File

@ -92,11 +92,11 @@ $(document).ready(function(){
<label class="radio inline">
<input type="radio" id="inlineCheckbox1" name="language" value="zh"
<?= isset($this->ev['language']) && $this->ev['language'] =='zh' ? 'checked="checked"':"" ?>
<?= !isset($this->ev['language']) || empty($this->ev['language']) ? 'checked="checked"':"" ?>
> zh
</label>
<label class="radio inline">
<input type="radio" id="inlineCheckbox1" name="language" value="en" <?= isset($this->ev['language']) && $this->ev['language'] =='en' ? 'checked="checked"':"" ?>> en
<input type="radio" id="inlineCheckbox1" name="language" value="en" <?= isset($this->ev['language']) && $this->ev['language'] =='en' ? 'checked="checked"':"" ?>
<?= !isset($this->ev['language']) || empty($this->ev['language']) ? 'checked="checked"':"" ?>> en
</label>
</div>
</div>

View File

@ -373,7 +373,7 @@ class Archive
}
//执行SQL语句后返回插入文章表的ID
$sql = "INSERT INTO ".$this->tbl_archives." (userid,title,description,image,source,ts_published,is_pub,body)
$sql = "INSERT INTO ".$this->tbl_archives." (userid,title,description,image,source,ts_published,is_pub,body,language)
VALUES (
".$data['userid'].",
".$data['title'].",
@ -382,7 +382,8 @@ class Archive
".$data['source'].",
".$data['ts_published'].",
".$data['is_pub'].",
".$data['body']."
".$data['body'].",
".$data['language']."
)
RETURNING id";
try{
@ -434,7 +435,8 @@ class Archive
source=".$data['source'].",
ts_published=".$data['ts_published'].",
is_pub=".$data['is_pub'].",
body=".$data['body']."
body=".$data['body'].",
language=".$data['language']."
WHERE id=$aid";
try{
if($this->db->exec($sql))