server.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:radio-server 作者: ernitron 项目源码 文件源码
def p(self, id):
        html = ""
        if id == "" or id == None :
            html += "Error no radio id"
            return html
        if id == "0" :
          html += "0 is reserved, sorry"
          return html

        (radio, genre, url) = playradio(id)
        if  url == '':
            html += "Error in parameter %s" % url
            return html

        cherrypy.session['playing'] = id
        html += '''<h3>Now Playing: '''
        html += '''<a href="%s">%s</a>''' % (url, radio)
        html += '''<a href="#" onClick="fplayradio('%s')">''' % id
        html += '''<span class="glyphicon glyphicon-play"></span></a>'''
        html += '''&nbsp;<a href="#" onClick="fmodradio('%s')"><span class="glyphicon glyphicon-pencil"></span></a></small>&nbsp;''' % id
        html += '''<a href="#" onClick="fdelradio('%s')"><span class="glyphicon glyphicon-trash"></span></a>&nbsp;''' % id
        html += '''<a href="#" onClick="faddfav('%s')"><span class="glyphicon glyphicon-star"></span></a>''' % id
        html += '''</h3>'''
        print html
        return html
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号